Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example query and response for the LogX Odin REST API /api/annotate endpoint
{
"text": "How many TEUs of DoD Frozen Meat are heading to Hamburg?",
"sentences": [
{
"words": [
"How",
"many",
"TEUs",
"of",
"DoD",
"Frozen",
"Meat",
"are",
"heading",
"to",
"Hamburg",
"?"
],
"startOffsets": [
0,
4,
9,
14,
17,
21,
28,
33,
37,
45,
48,
55
],
"endOffsets": [
3,
8,
13,
16,
20,
27,
32,
36,
44,
47,
55,
56
],
"raw": [
"How",
"many",
"TEUs",
"of",
"DoD",
"Frozen",
"Meat",
"are",
"heading",
"to",
"Hamburg",
"?"
],
"tags": [
"WRB",
"JJ",
"NNS",
"IN",
"NNP",
"NNP",
"NNP",
"VBP",
"VBG",
"TO",
"NNP",
"."
],
"lemmas": [
"how",
"many",
"teus",
"of",
"DoD",
"Frozen",
"Meat",
"be",
"head",
"to",
"Hamburg",
"?"
],
"entities": [
"O",
"O",
"O",
"O",
"B-ORG",
"I-ORG",
"I-ORG",
"O",
"O",
"O",
"B-LOC",
"O"
],
"graphs": {
"universal-enhanced": {
"edges": [
{
"source": 2,
"destination": 6,
"relation": "nmod_of"
},
{
"source": 6,
"destination": 3,
"relation": "case"
},
{
"source": 6,
"destination": 4,
"relation": "compound"
},
{
"source": 6,
"destination": 5,
"relation": "compound"
},
{
"source": 8,
"destination": 2,
"relation": "nsubj"
},
{
"source": 2,
"destination": 1,
"relation": "amod"
},
{
"source": 10,
"destination": 9,
"relation": "case"
},
{
"source": 8,
"destination": 11,
"relation": "punct"
},
{
"source": 8,
"destination": 7,
"relation": "aux"
},
{
"source": 8,
"destination": 10,
"relation": "nmod_to"
},
{
"source": 1,
"destination": 0,
"relation": "advmod"
}
],
"roots": [
8
]
},
"semantic-roles": {
"edges": [
{
"source": 1,
"destination": 2,
"relation": "A1"
}
],
"roots": [
1
]
},
"universal-basic": {
"edges": [
{
"source": 6,
"destination": 3,
"relation": "case"
},
{
"source": 6,
"destination": 5,
"relation": "compound"
},
{
"source": 6,
"destination": 4,
"relation": "compound"
},
{
"source": 8,
"destination": 2,
"relation": "nsubj"
},
{
"source": 2,
"destination": 1,
"relation": "amod"
},
{
"source": 8,
"destination": 10,
"relation": "nmod"
},
{
"source": 10,
"destination": 9,
"relation": "case"
},
{
"source": 8,
"destination": 11,
"relation": "punct"
},
{
"source": 8,
"destination": 7,
"relation": "aux"
},
{
"source": 1,
"destination": 0,
"relation": "advmod"
},
{
"source": 2,
"destination": 6,
"relation": "nmod"
}
],
"roots": [
8
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment