<!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>