example_demo3.html
13.7 KB
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Multi Tier Annotation Search</title>
<script type="text/javascript" src="./js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="./js/solr.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<h1>Multi Tier Annotation Search - example demo3 (ISO-TEI examples)</h1>
<div>
Go to <a href="index.html">main page</a>.
</div>
<hr noshade />
<h3>Create index</h3>
Post to /solr/demo3/update
<div class="solr" data-type="json" data-url="/solr/demo3/update?wt=json&commitWithin=1000">
<div class="post"><textarea data-autoresize>[{ "id": "1","type": "iso-tei","author":"Unknown","title":"Anne Will","text":"isotei-samples/EXMARaLDA_DEMO_ISO_TEI/DE_AnneWill.xml" },
{ "id": "2","type": "iso-tei","author":"Unknown","title":"Forum Waffenrecht","text":"isotei-samples/EXMARaLDA_DEMO_ISO_TEI/DE_ForumWaffenrecht.xml" },
{ "id": "3","type": "iso-tei","author":"Unknown","title":"Hart aber Fair","text":"isotei-samples/EXMARaLDA_DEMO_ISO_TEI/DE_HartAberFair.xml" },
{ "id": "4","type": "iso-tei","author":"Unknown","title":"FOLK_E_00064_SE_01_T_01_DF_01","text":"isotei-samples/FOLK_STUTTGART_21_TEI_ISO/FOLK_E_00064_SE_01_T_01_DF_01.xml" },
{ "id": "5","type": "iso-tei","author":"Unknown","title":"FOLK_E_00064_SE_01_T_02_DF_01","text":"isotei-samples/FOLK_STUTTGART_21_TEI_ISO/FOLK_E_00064_SE_01_T_02_DF_01.xml" },
{ "id": "6","type": "iso-tei","author":"Unknown","title":"FOLK_E_00064_SE_01_T_03_DF_01","text":"isotei-samples/FOLK_STUTTGART_21_TEI_ISO/FOLK_E_00064_SE_01_T_03_DF_01.xml" }]</textarea></div>
<input class="button post" type="button" value="create index" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
<hr noshade />
<h3>Empty index</h3>
Post to /solr/demo3/update
<div class="solr" data-type="json" data-url="/solr/demo3/update?wt=json&commitWithin=1000">
<div class="post"><textarea data-autoresize>{
"delete": {
"query": "*:*"
}
}</textarea></div>
<input class="button post" type="button" value="delete index" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
<hr noshade />
<h3>Query</h3>
<div>
Search for 'Waffenrecht' - classic; post to /solr/demo3/select
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*waffenrecht*</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Search for 'Waffenrecht' - corpus query language (cql); post to /solr/demo3/select
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[w=\"Waffenrecht\"]"}</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Basic stats</h3>
<div>
Get the number of positions; post to /solr/demo3/select
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.positions=true&mtas.stats.positions.0.key=number of positions&mtas.stats.positions.0.field=text&mtas.stats.positions.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Get the number of tokens; post to /solr/demo3/select
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.tokens=true&mtas.stats.tokens.0.key=number of tokens&mtas.stats.tokens.0.field=text&mtas.stats.tokens.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Get the number of nouns; post to /solr/demo3/select
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.spans=true&mtas.stats.spans.0.key=number of nouns&mtas.stats.spans.0.field=text&mtas.stats.spans.0.type=all&mtas.stats.spans.0.query.0.type=cql&mtas.stats.spans.0.query.0.value=[pos="NN"]&mtas.stats.spans.0.function.0.key=fraction of nouns&mtas.stats.spans.0.function.0.expression=$q0/$n&mtas.stats.spans.0.function.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Kwic</h3>
Keyword in Context while searching for 'Waffenrecht'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[w="Waffenrecht"]&mtas.kwic.0.prefix=w&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for 'Waffenrecht' followed by 'legalisiert'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[w="Waffenrecht"][w="legalisiert"]&mtas.kwic.0.prefix=w&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for punctuation elements ; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[pc=".*"]&mtas.kwic.0.prefix=w,pc&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for 'vor' followed by 'bei' ignoring pause and anchors.time elements; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[w="vor"][w="bei"]&mtas.kwic.0.query.ignore=[anchor.time=".*"|pause=".*"]&mtas.kwic.0.prefix=w&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br/>
Keyword in Context while searching for punctuation elements ; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[pc=".*"]&mtas.kwic.0.prefix=w,pc&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for annotationBlocks containing 'Yo' for speakers whose sex is '1'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Yo*&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=(<annotationBlock.interval/>) containing ([annotationBlock.sex="1"%26w="Yo"])&mtas.kwic.0.prefix=w,pc,annotationBlock.sex&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for annotationBlocks with id 'au22'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="<annotationBlock.id=\"au22\"/>"}&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=<annotationBlock.id="au22"/>&mtas.kwic.0.prefix=w&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Termvector</h3>
Termvector of w with regexp [a-z]{5,*} for documents containing 'Waffenrecht'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*Waffenrecht*&mtas=true&mtas.termvector=true&mtas.termvector.0.field=text&mtas.termvector.0.prefix=w&mtas.termvector.0.key=termvector on w&mtas.termvector.0.type=n,sum,mean&mtas.termvector.0.sort.type=sum&mtas.termvector.0.sort.direction=desc&mtas.termvector.0.number=20&mtas.termvector.0.regexp=[a-z]{5,}</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Group</h3>
Group pos,w for any token followed by lemma 'Meter'; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[][lemma=\"Meter\"]"}&mtas=true&mtas.group=true&mtas.group.0.field=text&mtas.group.0.query.type=cql&mtas.group.0.query.value=[][lemma="Meter"]&mtas.group.0.grouping.hit.inside.prefixes=pos,w</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Prefixes</h3>
Available prefixes; post to /solr/demo3/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo3/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.prefix=true&mtas.prefix.0.field=text&mtas.prefix.0.key=prefixes</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<div>
Go to <a href="index.html">main page</a>.
</div>
</body>
</html>