-
Notifications
You must be signed in to change notification settings - Fork 207
/
application-suite.xml
584 lines (488 loc) · 19.7 KB
/
application-suite.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
"http://www.docbook.org/xml/5.0/dtd/docbook.dtd" [
<!ENTITY % local SYSTEM "local-entities.ent">
<!ENTITY % custom SYSTEM "custom-entities.ent">
%local;
%custom;
]>
<chapter xml:id="chapter.application-suite"
xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:product="http://www.carrot2.org"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Tools and APIs</title>
<subtitle>&PROD; distribution suite</subtitle>
<para>
&PROD; comes with a suite of tools and APIs that you can use to
quickly set up clustering on your own data, tune clustering results,
call &PROD; clustering from your Java or C# code or
access &PROD; clustering as a remote service.
</para>
<para>
&PROD; distribution contains the following elements:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>&DCW;</title>
<para>
which is a standalone GUI application you can use to experiment with &PROD;
clustering on data from common search engines or your own data,
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>&JA;</title>
<para>
for calling &PROD; document clustering from your Java code,
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>&CSA;</title>
<para>
for calling &PROD; document clustering from your C# or .NET code,
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>&DCS;</title>
<para>
which exposes &PROD; clustering as a REST service,
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>&CLI;</title>
<para>
applications which allow invoking &PROD; clustering from command line,
</para>
</formalpara>
</listitem>
<listitem role="webapp">
<formalpara>
<title>&WA;</title>
<para>
which exposes &PROD; clustering as a web application for end users.
</para>
</formalpara>
</listitem>
</itemizedlist>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="application-suite-intro-suffix.xml" />
<section xml:id="section.workbench">
<title>&DCW;</title>
<para>
&DCW; is a standalone GUI application you can use to experiment with &PROD;
clustering on data from common search engines or your own data.
</para>
<para>
You can use &DCW; to:
</para>
<itemizedlist>
<listitem>
<para>
Quickly test &PROD; clustering with your own data. Please see <xref linkend="chapter.getting-started" />
for instructions for the most common scenarios.
</para>
</listitem>
<listitem>
<para>
Fine tune &PROD; clustering algorithms' settings to work best with your specific data.
Please see <xref linkend="chapter.tuning" /> for more details.
</para>
</listitem>
<listitem>
<para>Run simple performance benchmarks using different settings to predict maximum clustering throughput
on a single machine. Please see <xref linkend="section.workbench.benchmarking" /> for details.</para>
</listitem>
</itemizedlist>
<para>
&DCW; features include:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>Various document sources included.</title>
<para>
&DCW; can fetch and cluster documents from a number of sources, including major search
engines, indexing engines (Lucene, Solr) as well as generic
XML feeds and files.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Live tuning of clustering algorithm attributes.</title>
<para>
&DCW; enables modifying clustering algorithm's attributes and observing the
results in real time.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Performance benchmarking.</title>
<para>
&DCW; can run simple performance benchmarks of &PROD; clustering algorithms.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Attractive visualizations.</title>
<para>
&DCW; comes with two visualizations of the cluster structure, one developed
within the &PROD; project and another one from Aduna Software.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Modular architecture and extendability.</title>
<para>
&DCW; is based on Eclipse Rich Client Platform, which makes it easily
extendable.
</para>
</formalpara>
</listitem>
</itemizedlist>
<figure>
<title>&DCW; screenshot</title>
<mediaobject>
<imageobject role="html">
<imagedata format="PNG" fileref="img/workbench.png" />
</imageobject>
</mediaobject>
</figure>
<section xml:id="section.workbench.installation" role="notoc">
<title>Installation and running</title>
<para>
To run &DCW;:
</para>
<orderedlist>
<listitem>
<para>Download and install <link xlink:href="http://java.sun.com/javase/downloads/index.jsp">Java Runtime Environment</link> (version 1.7.0 or newer) if you have not done so.</para>
</listitem>
<listitem role="private">
<para>
Download &DCW; <product:workbench-download-link os="win32" wm="win32">Windows binaries</product:workbench-download-link>
or <product:workbench-download-link os="linux" wm="gtk">Linux binaries</product:workbench-download-link>
and extract the archive to some local disk location.
</para>
</listitem>
<xi:include href="application-suite-dcw-download.xml">
<xi:fallback />
</xi:include>
<listitem>
<para>Run <command>&PRODID;-workbench.exe</command> (Windows) or <command>&PRODID;-workbench</command> (Linux).</para>
</listitem>
</orderedlist>
</section>
</section>
<section xml:id="section.java-api">
<title>&JA;</title>
<para>
The &JA; package contains &PROD; JAR files along with all dependencies, JavaDoc API reference
and Java code examples. You can use this package to integrate &PROD; clustering into your Java software. Please
see <xref linkend="section.integration.compiling-java-program-with-carrot2" /> and
<xref linkend="section.integration.seting-up-c2-project-in-eclipse" /> for instructions.
</para>
</section>
<section xml:id="section.csharp-api">
<title>&CSA;</title>
<para>
The &CSA; package contains all DLL libraries required to run &PROD;,
C# API reference and code examples. You can use this package to integrate &PROD;
clustering into your C# / .NET software. Please see
<xref linkend="section.integration.compiling-csharp-program-with-carrot2" /> for instructions.
</para>
</section>
<section xml:id="section.dcs">
<title>&DCS;</title>
<para>
&DCS; (DCS) exposes &PROD; clustering as a REST service.
It can cluster documents from an external source (e.g. a search engine) or
documents provided directly as an XML stream and returns results in
<link linkend="section.architecture.input-xml">XML</link> or
<link linkend="section.architecture.output-json">JSON</link> formats.
</para>
<para>
You can use &DCS; to:
</para>
<itemizedlist>
<listitem>
<para>Integrate &PROD; with your non-Java software.</para>
</listitem>
<listitem>
<para>
Build a high-throughput document clustering system by setting up a number of
load-balanced instances of the DCS.
</para>
</listitem>
</itemizedlist>
<para>
&DCS; features include:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>XML and JSON response formats.</title>
<para>
&DCS; can return results both in XML and <link linkend="section.architecture.output-json">JSON</link>
formats. JSON-P (with callback) is also supported.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Various document sources included.</title>
<para>
&DCS; can fetch and cluster documents from a large number of sources,
including major search engines and indexing engines (Lucene, Solr).
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Direct XML feed.</title>
<para>
&DCS; can cluster documents fed directly in a simple XML format.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>PHP and C# examples included.</title>
<para>
&DCS; ships with ready-to-use examples of calling &PROD; DCS services from PHP
(version 5), C#, Ruby, Java and <command>curl</command>.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Quick start screen.</title>
<para>
A simple quick start screen will let you make your first DCS request straight
from your browser.
</para>
</formalpara>
</listitem>
</itemizedlist>
<figure>
<title>&DCS; quick start screen</title>
<mediaobject>
<imageobject role="html">
<imagedata format="PNG" fileref="img/dcs.png" />
</imageobject>
</mediaobject>
</figure>
<section xml:id="section.dcs.installation" role="notoc">
<title>Installation and running</title>
<para>To run &DCS;:</para>
<orderedlist>
<listitem>
<para>Download and install <link xlink:href="http://java.sun.com/javase/downloads/index.jsp">Java Runtime Environment</link> (version 1.7.0 or newer) if you have not done so.</para>
</listitem>
<listitem role="private">
<para>
Download <product:dcs-download-link>&DCS; binaries</product:dcs-download-link> and
extract the archive to some local disk location.
</para>
</listitem>
<xi:include href="application-suite-dcs-download.xml">
<xi:fallback />
</xi:include>
<listitem>
<para>Run <command>dcs.cmd</command> (Windows) or <command>dcs.sh</command> (Linux).</para>
</listitem>
<listitem>
<para>Point your browser to <uri>http://localhost:8080</uri> for further instructions.</para>
</listitem>
<listitem>
<para>
See the <filename>examples/</filename> directory in the distribution archive
for PHP, C#, Ruby and Java code examples. <phrase role="carrot2">You can also
<link linkend="section.advanced-topics.using-dcs-with-curl">invoke DCS clustering
using the <command>curl</command> command</link>.</phrase>
</para>
</listitem>
</orderedlist>
<tip>
<para>
If you need to start the DCS at a port different than 8080, you can use the
<option>-port</option> option:
</para>
<programlisting><![CDATA[dcs -port 9090]]></programlisting>
</tip>
<tip>
<para>
To deploy the DCS in an external servlet container, such as Apache Tomcat, use
the <filename>&PRODID;-dcs.war</filename> file from the <filename>war/</filename>
folder of the DCS distribution.
</para>
</tip>
</section>
</section>
<section xml:id="section.webapp" role="webapp">
<title>&WA;</title>
<para>
&WA; exposes &PROD; clustering as a web application for end users. It allows users
to browse clusters using a conventional tree view, but also in an attractive visualization.
</para>
<para>
&DCS; features include:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>Two cluster views.</title>
<para>
&WA; offers two views of the clusters generated by &PROD;: conventional tree
view and spatial visualizations.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>All &PROD; document sources and algorithms included.</title>
<para>
&WA; contains a large number of document sources, including major search
engines. Optionally, further document sources can be added, such as
Lucene or Solr ones. It also contains all &PROD;'s clustering algorithms.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>XSLT and JavaScript-based presentation layer.</title>
<para>
Look & feel of the &WA; can be easily changed by editing a number of XSLT
style sheets. All common style sheets and JavaScripts can be re-used when
implementing a new look & feel.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>High-performance front-end.</title>
<para>
The front-end of the &WA; has been optimized for fast loading by using such techniques as
JavaScript and CSS merging and minification, as well as using
<link xlink:href="http://smartsprites.osinski.name">CSS sprites</link>.
</para>
</formalpara>
</listitem>
</itemizedlist>
<figure>
<title>&WA; results screen</title>
<mediaobject>
<imageobject role="html">
<imagedata format="PNG" fileref="img/webapp.png" />
</imageobject>
</mediaobject>
</figure>
<section xml:id="section.webapp.installation" role="notoc">
<title>Installation and running</title>
<para>To run &WA;:</para>
<orderedlist>
<listitem>
<para>Make sure you have access to a Servlet API 2.4 compliant container, such as Apache Tomcat.</para>
</listitem>
<listitem>
<para>Download <product:webapp-download-link>&WA; WAR file</product:webapp-download-link>.</para>
</listitem>
<listitem>
<para>Deploy the WAR file to your servlet container.</para>
</listitem>
</orderedlist>
</section>
</section>
<section xml:id="section.cli">
<title>&CLI;</title>
<para>
&CLI; (CLI) is a set of applications that allow invoking &PROD; clustering
from the command line. Currently, the only available CLI application is &CLIBP;, which
performs &PROD; clustering on one or more files in the &C2; <link linkend="section.architecture.input-xml">XML format</link>
and saves the results as <link linkend="section.architecture.output-xml">XML</link>
or <link linkend="section.architecture.output-json">JSON</link>. Apart from
clustering large number of documents sets at one time, you can use the &CLIBP;
to integrate &PROD; with your non-Java applications.
</para>
<section xml:id="section.cli.bp.installation" role="notoc">
<title>Installation and running</title>
<para>To run &CLIBP;:</para>
<orderedlist>
<listitem>
<para>Download and install <link xlink:href="http://java.sun.com/javase/downloads/index.jsp">Java Runtime Environment</link> (version 1.7.0 or newer) if you have not done so.</para>
</listitem>
<listitem role="private">
<para>
Download <product:cli-download-link>&CLI; binaries</product:cli-download-link> and
extract the archive to some local disk location.
</para>
</listitem>
<xi:include href="application-suite-cli-download.xml">
<xi:fallback />
</xi:include>
<listitem>
<para>
Run <command>batch.cmd</command> (Windows) or <command>batch.sh</command>
(Linux) for an overview of the syntax. The &CLIBP; ships with two example
input data sets located in the <filename>input/</filename> directory.
Below is a list of some common example invocations.
</para>
<itemizedlist>
<listitem>
<para>To cluster one or more input files, specify their paths:</para>
<programlisting><![CDATA[batch input/data-mining.xml input/seattle.xml]]></programlisting>
<para>
Clustering will be performed using the default clustering algorithm
and the results in the XML format will be saved to the <filename>output</filename>
directory relative to the current working directory.
</para>
</listitem>
<listitem>
<para>You can also cluster files from one or more directories:</para>
<programlisting><![CDATA[batch input/]]></programlisting>
<para>
Each directory will be processed recursively, i.e. including subdirectories.
For each specified input directory, a corresponding directory with results
will be created in the output directory.
</para>
</listitem>
<listitem>
<para>To save results in the non-default directory, use the <option>-o</option> option:</para>
<programlisting><![CDATA[batch input/ -o results]]></programlisting>
</listitem>
<listitem>
<para>To repeat the input documents on the output, use the <option>-d</option> option:</para>
<programlisting><![CDATA[batch input/ -d]]></programlisting>
</listitem>
<listitem>
<para>To save the results in <link linkend="section.architecture.output-json">JSON</link>, use the <option>-f JSON</option> option:</para>
<programlisting><![CDATA[batch input/ -f JSON]]></programlisting>
</listitem>
<listitem>
<para>To use a different clustering algorithm, use the <option>-a</option>
option followed by the identifier of the algorithm:</para>
<programlisting><![CDATA[batch input/ -a url]]></programlisting>
<para>To see the list of available algorithm identifiers, run the application without arguments.</para>
</listitem>
<listitem>
<para>In case of processing errors, you can use the <option>-v</option>
option to see detailed messages and stack traces.</para>
</listitem>
</itemizedlist>
</listitem>
</orderedlist>
</section>
</section>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="application-suite-solr.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="application-suite-es.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="application-suite-sections-suffix.xml" />
</chapter>