Skip to content

Instantly share code, notes, and snippets.

@myedibleenso
Last active June 4, 2020 08:25
Show Gist options
  • Save myedibleenso/9241a4c9c71d29f148ef0b8c44602b60 to your computer and use it in GitHub Desktop.
Save myedibleenso/9241a4c9c71d29f148ef0b8c44602b60 to your computer and use it in GitHub Desktop.
Example query and response for the LogX Odin REST API
{
"documents" : {
"903668275" : {
"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 ]
},
"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 ]
}
}
} ]
}
},
"mentions" : [ {
"type" : "TextBoundMention",
"id" : "T:580155353",
"text" : "DoD",
"labels" : [ "Organization", "Concept", "Entity" ],
"tokenInterval" : {
"start" : 4,
"end" : 5
},
"characterStartOffset" : 17,
"characterEndOffset" : 20,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "org-ner"
}, {
"type" : "TextBoundMention",
"id" : "T:714333450",
"text" : "Frozen Meat",
"labels" : [ "Cargo", "Concept", "Entity" ],
"tokenInterval" : {
"start" : 5,
"end" : 7
},
"characterStartOffset" : 21,
"characterEndOffset" : 32,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "cargo"
}, {
"type" : "TextBoundMention",
"id" : "T:121273282",
"text" : "Hamburg",
"labels" : [ "Location", "Concept", "Entity" ],
"tokenInterval" : {
"start" : 10,
"end" : 11
},
"characterStartOffset" : 48,
"characterEndOffset" : 55,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "loc-ner"
}, {
"type" : "TextBoundMention",
"id" : "T:1869844200",
"text" : "TEUs",
"labels" : [ "Unit", "Measurement" ],
"tokenInterval" : {
"start" : 2,
"end" : 3
},
"characterStartOffset" : 9,
"characterEndOffset" : 13,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "units"
}, {
"type" : "EventMention",
"id" : "E:-493672815",
"text" : "Frozen Meat are heading to Hamburg",
"labels" : [ "Transport", "Event" ],
"trigger" : {
"type" : "TextBoundMention",
"id" : "T:1719291010",
"text" : "heading",
"labels" : [ "Transport", "Event" ],
"tokenInterval" : {
"start" : 8,
"end" : 9
},
"characterStartOffset" : 37,
"characterEndOffset" : 44,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "transport-1-syntax"
},
"arguments" : {
"shipment" : [ {
"type" : "TextBoundMention",
"id" : "T:714333450",
"text" : "Frozen Meat",
"labels" : [ "Cargo", "Concept", "Entity" ],
"tokenInterval" : {
"start" : 5,
"end" : 7
},
"characterStartOffset" : 21,
"characterEndOffset" : 32,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "cargo"
} ],
"destination" : [ {
"type" : "TextBoundMention",
"id" : "T:121273282",
"text" : "Hamburg",
"labels" : [ "Location", "Concept", "Entity" ],
"tokenInterval" : {
"start" : 10,
"end" : 11
},
"characterStartOffset" : 48,
"characterEndOffset" : 55,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "loc-ner"
} ]
},
"paths" : {
"shipment" : {
"T:714333450" : [ {
"source" : 8,
"destination" : 2,
"relation" : "nsubj"
}, {
"source" : 2,
"destination" : 6,
"relation" : "nmod_of"
} ]
},
"destination" : {
"T:121273282" : [ {
"source" : 8,
"destination" : 10,
"relation" : "nmod_to"
} ]
}
},
"tokenInterval" : {
"start" : 5,
"end" : 11
},
"characterStartOffset" : 21,
"characterEndOffset" : 55,
"sentence" : 0,
"document" : "903668275",
"keep" : true,
"foundBy" : "transport-1-syntax"
} ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment