-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·70 lines (51 loc) · 1.53 KB
/
README
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
A very simple Sinatra webservice wrapper around DRMaciver's termextractor.
INSTALLATION
------------
To install required gems, run:
script/install_gems
RUNNING
-------
To run the webservice, run:
jruby app.rb RACK_ENV=production
(NOTE: the termextractor gem requires jruby, hence so does the webservice)
This will start by default on port 4567. You can specify a different port with the -p parameter
USAGE
-----
The webservice responds to GET or POST requests to /terms, with the following parameters:
format=<xml|json|html>
Format in which to return results (default is html)
text=<text from which to extract terms>
e.g. assuming the webservice is running on localhost, port 4567
http://localhost:4567/terms?text=Term%20Extractor%20Server
produces:
<ul>
<li>
<dl>
<dt>to_s:</dt>
<dd class="to_s">Term Extractor Server</dd>
<dt>pos:</dt>
<dd class="pos">NN-NNP-NNP</dd>
<dt>sentence:</dt>
<dd class="sentence">0</dd>
<dt>chunks:</dt>
<dd>
<ul class="chunks">
<li class="chunk">B-NP</li>
<li class="chunk">I-NP</li>
<li class="chunk">I-NP</li>
</ul>
</dd>
<dt>Tokens:</dt>
<dd>
<ul class="tokens">
<li class="token">Term</li>
<li class="token">Extractor</li>
<li class="token">Server</li>
</ul>
</dd>
</dl>
</li>
</ul>
LICENSE
-------
Licensed under the "3-clause" BSD license. For terms, see the file LICENSE.