-
Notifications
You must be signed in to change notification settings - Fork 3
Service: Match Information
Nils Diewald edited this page Jan 21, 2025
·
19 revisions
Returns annotation data of a specified match. The annotations are represented in HTML using span elements.
Available in: lite and full version
Method: GET
Service URL: root/corpus/{corpus_id}/{doc_id}/{text_id}/{match_id}
Path parameters
name | required | description | type | example |
---|---|---|---|---|
corpus_id | yes | corpus id | String | GOE |
doc_id | yes | document id | String | AGA |
text_id | yes | text id | String | 01784 |
match_id | yes | match id describes the location of a match/hit in a text. | String | p4145-4146 |
Header Parameter (Optional)
Name | Required | Authentication scheme | Value |
---|---|---|---|
Authorization | no | HTTP authentication with schemes: Bearer | OAuth2 access token |
Query Parameters
Name | Required | Description | Type | Examples |
---|---|---|---|---|
foundry | yes | a list of foundries of the match | String, List<String> | foundry=* (match all available foundries) foundry=tt foundry=corenlp&foundry=tt |
layer | no | a list of layers of the match | String, List<String> | layer=p layer=p&layer=l |
spans | no | determiner to retrieve annotation spans of tree structures, e.g. constituents, default: false | Boolean | false |
Request
curl 'http://localhost:8089/api/v1.0/search?q=Wasser&ql=poliqarp'
curl 'http://localhost:8089/api/v1.0/corpus/GOE/AGA/01784/p4145-4146?foundry=opennlp'
Using authentication token
curl -H 'Authorization: Bearer d4f57fd6b933bb79556abfa23b0e6170'
'http://localhost:8089/api/v1.0/corpus/GOE/AGA/01784/p4145-4146?foundry=opennlp'
Response
{
"@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
"meta": {
"version": "Krill-0.63.2"
},
"hasSnippet": true,
"hasTokens": false,
"context": {
"left": [
"token",
0
],
"right": [
"token",
0
]
},
"snippet": "<span class=\"context-left\"></span><span class=\"match\"><span title=\"opennlp/p:PPER\">es</span> <span title=\"opennlp/p:VAFIN\">war</span> <span title=\"opennlp/p:ART\">ein</span> <span title=\"opennlp/p:ADJA\">ärgerlicher</span> <span title=\"opennlp/p:NN\">Anblick</span>; <span title=\"opennlp/p:ART\">die</span> <span title=\"opennlp/p:NN\">Fallbrücke</span> <span title=\"opennlp/p:VVFIN\">reichte</span> <span title=\"opennlp/p:PTKNEG\">nicht</span> <span title=\"opennlp/p:APPR\">bis</span> <span title=\"opennlp/p:APPRART\">ans</span> <span title=\"opennlp/p:ADJA\">trockene</span> <span title=\"opennlp/p:NN\">Land</span>, <span title=\"opennlp/p:ART\">die</span> <span title=\"opennlp/p:ADJA\">kleine</span> <span title=\"opennlp/p:NN\">Garnison</span> <span title=\"opennlp/p:VVFIN\">mußte</span> <span title=\"opennlp/p:PROAV\">daher</span> <span title=\"opennlp/p:ADV\">erst</span> <span title=\"opennlp/p:APPRART\">durchs</span> <mark><span title=\"opennlp/p:NN\">Wasser</span></mark> <span title=\"opennlp/p:VVFIN\">waten</span>, <span title=\"opennlp/p:KOUS\">bis</span> <span title=\"opennlp/p:PPER\">sie</span> <span title=\"opennlp/p:ART\">den</span> <span title=\"opennlp/p:NN\">Kreis</span> <span title=\"opennlp/p:PPOSAT\">ihrer</span> <span title=\"opennlp/p:NN\">Gegner</span> <span title=\"opennlp/p:VVFIN\">erreichten</span>.</span><span class=\"context-right\"></span>",
"fields": [
{
"@type": "koral:field",
"key": "ID"
},
{
"@type": "koral:field",
"key": "textSigle",
"type": "type:string",
"value": "GOE/AGA/01784"
},
{
"@type": "koral:field",
"key": "corpusID"
},
{
"@type": "koral:field",
"key": "author",
"type": "type:text",
"value": "Goethe, Johann Wolfgang von"
},
{
"@type": "koral:field",
"key": "title",
"type": "type:text",
"value": "Belagerung von Mainz"
},
{
"@type": "koral:field",
"key": "subTitle"
},
{
"@type": "koral:field",
"key": "textClass"
},
{
"@type": "koral:field",
"key": "pubPlace",
"type": "type:string",
"value": "München"
},
{
"@type": "koral:field",
"key": "pubDate",
"type": "type:date",
"value": "1982"
},
{
"@type": "koral:field",
"key": "availability",
"type": "type:string",
"value": "CC-BY-SA"
},
{
"@type": "koral:field",
"key": "layerInfos",
"type": "type:store",
"value": "corenlp/c=spans corenlp/p=tokens corenlp/s=spans dereko/s=spans malt/d=rels marmot/m=tokens marmot/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens"
},
{
"@type": "koral:field",
"key": "docSigle",
"type": "type:string",
"value": "GOE/AGA"
},
{
"@type": "koral:field",
"key": "corpusSigle",
"type": "type:string",
"value": "GOE"
}
],
}
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery