comparison ttools/templates/api.html @ 0:af2f8fe486f6 default tip

initial
author Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de>
date Tue, 17 Feb 2015 12:44:40 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:af2f8fe486f6
1 <h2>How to use the API</h2>
2
3 This service implements a simpler versiom of the API defined at
4 <a href="https://dandelion.eu/docs/api/datatxt/nex/v1/">Dandelion.eu for text extraction</a> and was
5 mainly designed to serve the needs of Pundit (<a href="https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-content/wiki/pundit">https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-content/wiki/pundit</a>)
6
7
8 The call is
9
10 <a href="../tt?text=Ego+sum+in+horto&lang=lat">tt?text=Ego+sum+in+horto&lang=lat</a>
11
12 <h3>Text</h3>
13
14 Text expects plain text.
15
16 <h3>lang</h3>
17 Lang can either be "lat" for latin, "gre" for greek or "ita" for (old) Italian.
18
19
20 It returns a JSON file with the annotated text as described at <a href="https://dandelion.eu/docs/api/datatxt/nex/v1/">Dandelion.eu</a>,
21 while
22 <ul>
23 <li><b>title=label</b> is the main form of the word as can be found in the attached dictionaries.</li>
24
25 <li><b>abstract</b> contains an explanation of the term, if available</li>
26 <li> <b>uri</b> links to the dictionary service</li>
27 <li><b>confidence</b> is currently an <b>arbitrary</b> value
28 </ul>
29
30 <p>Currently this service only gives one possible meaning of a word, while the underlying service at <a href="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/">
31 http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/
32 </a> gives you all know variant, this is due to the necessary compatibility with the current pundit version.</p>
33
34 <pre>
35 {
36
37 "time": 1,
38 "lang": "lat",
39 "annotations":
40
41 [
42
43 {
44
45 "lod":
46
47 {
48
49 "word": "http://purl.org/linguistics/gold/OrthographicWord"
50
51 },
52 "image": { },
53 "confidence": 0.8,
54 "label": "Ego",
55 "spot": "Ego",
56 "type":
57 [
58
59 "http://purl.org/linguistics/gold/OrthographicWord"
60
61 ],
62 "title": "Ego",
63 "abstract": "",
64 "uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=Ego",
65 "types":
66
67 [
68 "http://purl.org/linguistics/gold/OrthographicWord"
69 ],
70 "end": 3,
71 "start": 0
72
73 },
74 {
75
76 "lod":
77
78 {
79
80 "word": "http://purl.org/linguistics/gold/OrthographicWord"
81
82 },
83 "image": { },
84 "confidence": 0.8,
85 "label": "sum",
86 "spot": "sum",
87 "type":
88 [
89
90 "http://purl.org/linguistics/gold/OrthographicWord"
91
92 ],
93 "title": "sum",
94 "abstract": "To be.",
95 "uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=sum",
96 "types":
97
98 [
99 "http://purl.org/linguistics/gold/OrthographicWord"
100 ],
101 "end": 7,
102 "start": 4
103
104 },
105 {
106
107 "lod":
108
109 {
110
111 "word": "http://purl.org/linguistics/gold/OrthographicWord"
112
113 },
114 "image": { },
115 "confidence": 0.8,
116 "label": "in",
117 "spot": "in",
118 "type":
119 [
120
121 "http://purl.org/linguistics/gold/OrthographicWord"
122
123 ],
124 "title": "in",
125 "abstract": "To admit an accusation broughte against one as lawful.",
126 "uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=in",
127 "types":
128
129 [
130 "http://purl.org/linguistics/gold/OrthographicWord"
131 ],
132 "end": 10,
133 "start": 8
134
135 },
136 {
137
138 "lod":
139
140 {
141
142 "word": "http://purl.org/linguistics/gold/OrthographicWord"
143
144 },
145 "image": { },
146 "confidence": 0.8,
147 "label": "horto",
148 "spot": "horto",
149 "type":
150 [
151
152 "http://purl.org/linguistics/gold/OrthographicWord"
153
154 ],
155 "title": "horto",
156 "abstract": "A knot gardÊ: a garden for pleasute: an ortharde.",
157 "uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=horto",
158 "types":
159
160 [
161 "http://purl.org/linguistics/gold/OrthographicWord"
162 ],
163 "end": 16,
164 "start": 11
165 }
166 ]
167
168 }
169 </pre>
170
171
172
173