Skip to content

API output examples

Adarsh Pyarelal edited this page May 7, 2018 · 2 revisions

JSON-LD output

{
  "@context" : {
    "Corpus" : "https://github.com/clulab/eidos/wiki/JSON-LD#Corpus",
    "Dependency" : "https://github.com/clulab/eidos/wiki/JSON-LD#Dependency",
    "DirectedRelation" : "https://github.com/clulab/eidos/wiki/JSON-LD#DirectedRelation",
    "Document" : "https://github.com/clulab/eidos/wiki/JSON-LD#Document",
    "Entity" : "https://github.com/clulab/eidos/wiki/JSON-LD#Entity",
    "Interval" : "https://github.com/clulab/eidos/wiki/JSON-LD#Interval",
    "Modifier" : "https://github.com/clulab/eidos/wiki/JSON-LD#Modifier",
    "Provenance" : "https://github.com/clulab/eidos/wiki/JSON-LD#Provenance",
    "Sentence" : "https://github.com/clulab/eidos/wiki/JSON-LD#Sentence",
    "State" : "https://github.com/clulab/eidos/wiki/JSON-LD#State",
    "Trigger" : "https://github.com/clulab/eidos/wiki/JSON-LD#Trigger",
    "Word" : "https://github.com/clulab/eidos/wiki/JSON-LD#Word"
  },
  "@type" : "Corpus",
  "documents" : [ {
    "@type" : "Document",
    "@id" : "_:Document_1",
    "sentences" : [ {
      "@type" : "Sentence",
      "@id" : "_:Sentence_1",
      "text" : "The significant increase in rainfall has caused worsened crop yields .",
      "words" : [ {
        "@type" : "Word",
        "@id" : "_:Word_1",
        "tag" : "DT",
        "entity" : "O",
        "startOffset" : 0,
        "endOffset" : 3,
        "lemma" : "the",
        "chunk" : "B-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_2",
        "tag" : "JJ",
        "entity" : "B-Quantifier",
        "startOffset" : 4,
        "endOffset" : 15,
        "lemma" : "significant",
        "chunk" : "I-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_3",
        "tag" : "NN",
        "entity" : "O",
        "startOffset" : 16,
        "endOffset" : 24,
        "lemma" : "increase",
        "chunk" : "I-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_4",
        "tag" : "IN",
        "entity" : "O",
        "startOffset" : 25,
        "endOffset" : 27,
        "lemma" : "in",
        "chunk" : "B-PP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_5",
        "tag" : "NNS",
        "entity" : "O",
        "startOffset" : 28,
        "endOffset" : 36,
        "lemma" : "rainfall",
        "chunk" : "B-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_6",
        "tag" : "VBZ",
        "entity" : "O",
        "startOffset" : 37,
        "endOffset" : 40,
        "lemma" : "have",
        "chunk" : "B-VP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_7",
        "tag" : "VBN",
        "entity" : "O",
        "startOffset" : 41,
        "endOffset" : 47,
        "lemma" : "cause",
        "chunk" : "I-VP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_8",
        "tag" : "VBN",
        "entity" : "O",
        "startOffset" : 48,
        "endOffset" : 56,
        "lemma" : "worsen",
        "chunk" : "I-VP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_9",
        "tag" : "NN",
        "entity" : "O",
        "startOffset" : 57,
        "endOffset" : 61,
        "lemma" : "crop",
        "chunk" : "B-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_10",
        "tag" : "NNS",
        "entity" : "O",
        "startOffset" : 62,
        "endOffset" : 68,
        "lemma" : "yield",
        "chunk" : "I-NP"
      }, {
        "@type" : "Word",
        "@id" : "_:Word_11",
        "tag" : ".",
        "entity" : "O",
        "startOffset" : 68,
        "endOffset" : 69,
        "lemma" : ".",
        "chunk" : "O"
      } ],
      "dependencies" : [ {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_3"
        },
        "destination" : {
          "@id" : "_:Word_1"
        },
        "relation" : "det"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_3"
        },
        "destination" : {
          "@id" : "_:Word_2"
        },
        "relation" : "amod"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_3"
        },
        "destination" : {
          "@id" : "_:Word_5"
        },
        "relation" : "nmod_in"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_5"
        },
        "destination" : {
          "@id" : "_:Word_4"
        },
        "relation" : "case"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_7"
        },
        "destination" : {
          "@id" : "_:Word_3"
        },
        "relation" : "nsubj"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_7"
        },
        "destination" : {
          "@id" : "_:Word_6"
        },
        "relation" : "aux"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_7"
        },
        "destination" : {
          "@id" : "_:Word_10"
        },
        "relation" : "dobj"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_7"
        },
        "destination" : {
          "@id" : "_:Word_11"
        },
        "relation" : "punct"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_10"
        },
        "destination" : {
          "@id" : "_:Word_8"
        },
        "relation" : "amod"
      }, {
        "@type" : "Dependency",
        "source" : {
          "@id" : "_:Word_10"
        },
        "destination" : {
          "@id" : "_:Word_9"
        },
        "relation" : "compound"
      } ]
    } ]
  } ],
  "extractions" : [ {
    "@type" : "Entity",
    "@id" : "_:Entity_1",
    "labels" : [ "NounPhrase", "Entity" ],
    "text" : "crop yields",
    "rule" : "simple-np++Decrease_ported_syntax_6_verb",
    "provenance" : [ {
      "@type" : "Provenance",
      "document" : {
        "@id" : "_:Document_1"
      },
      "sentence" : {
        "@id" : "_:Sentence_1"
      },
      "positions" : {
        "@type" : "Interval",
        "start" : 9,
        "end" : 10
      }
    } ],
    "states" : [ {
      "@type" : "State",
      "type" : "DEC",
      "text" : "worsened"
    } ]
  }, {
    "@type" : "Entity",
    "@id" : "_:Entity_2",
    "labels" : [ "NounPhrase", "Entity" ],
    "text" : "rainfall",
    "rule" : "simple-np++Increase_ported_syntax_1_noun",
    "provenance" : [ {
      "@type" : "Provenance",
      "document" : {
        "@id" : "_:Document_1"
      },
      "sentence" : {
        "@id" : "_:Sentence_1"
      },
      "positions" : {
        "@type" : "Interval",
        "start" : 5,
        "end" : 5
      }
    } ],
    "states" : [ {
      "@type" : "State",
      "type" : "INC",
      "text" : "increase",
      "modifiers" : [ {
        "@type" : "Modifier",
        "text" : "significant",
        "intercept" : 0.6154,
        "mu" : 1.034E-5,
        "sigma" : -0.001123
      } ]
    } ]
  }, {
    "@type" : "DirectedRelation",
    "@id" : "_:DirectedRelation_1",
    "labels" : [ "Causal", "DirectedRelation", "EntityLinker", "Event" ],
    "text" : "rainfall has caused worsened crop yields",
    "rule" : "ported_syntax_1_verb-Causal",
    "provenance" : [ {
      "@type" : "Provenance",
      "document" : {
        "@id" : "_:Document_1"
      },
      "sentence" : {
        "@id" : "_:Sentence_1"
      },
      "positions" : {
        "@type" : "Interval",
        "start" : 5,
        "end" : 10
      }
    } ],
    "trigger" : {
      "@type" : "Trigger",
      "text" : "caused",
      "provenance" : [ {
        "@type" : "Provenance",
        "document" : {
          "@id" : "_:Document_1"
        },
        "sentence" : {
          "@id" : "_:Sentence_1"
        },
        "positions" : {
          "@type" : "Interval",
          "start" : 7,
          "end" : 7
        }
      } ]
    },
    "sources" : [ {
      "@id" : "_:Entity_2"
    } ],
    "destinations" : [ {
      "@id" : "_:Entity_1"
    } ]
  } ]
}

JSON output

{
  "documents" : {
    "-1501028087" : {
      "sentences" : [ {
        "words" : [ "Water", "trucking", "has", "decreased", "due", "to", "the", "cost", "of", "fuel", "." ],
        "startOffsets" : [ 0, 6, 15, 19, 29, 33, 36, 40, 45, 48, 52 ],
        "endOffsets" : [ 5, 14, 18, 28, 32, 35, 39, 44, 47, 52, 53 ],
        "tags" : [ "NN", "NN", "VBZ", "VBN", "JJ", "TO", "DT", "NN", "IN", "NN", "." ],
        "lemmas" : [ "water", "trucking", "have", "decrease", "due", "to", "the", "cost", "of", "fuel", "." ],
        "entities" : [ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ],
        "norms" : [ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ],
        "chunks" : [ "B-NP", "I-NP", "B-VP", "I-VP", "B-ADJP", "B-PP", "B-NP", "I-NP", "B-PP", "B-NP", "O" ],
        "graphs" : {
          "universal-enhanced" : {
            "edges" : [ {
              "source" : 1,
              "destination" : 0,
              "relation" : "compound"
            }, {
              "source" : 3,
              "destination" : 1,
              "relation" : "nsubj"
            }, {
              "source" : 3,
              "destination" : 2,
              "relation" : "aux"
            }, {
              "source" : 3,
              "destination" : 7,
              "relation" : "nmod_due_to"
            }, {
              "source" : 3,
              "destination" : 10,
              "relation" : "punct"
            }, {
              "source" : 4,
              "destination" : 5,
              "relation" : "mwe"
            }, {
              "source" : 7,
              "destination" : 4,
              "relation" : "case"
            }, {
              "source" : 7,
              "destination" : 6,
              "relation" : "det"
            }, {
              "source" : 7,
              "destination" : 9,
              "relation" : "nmod_of"
            }, {
              "source" : 9,
              "destination" : 8,
              "relation" : "case"
            } ],
            "roots" : [ 3 ]
          },
          "universal-basic" : {
            "edges" : [ {
              "source" : 1,
              "destination" : 0,
              "relation" : "compound"
            }, {
              "source" : 3,
              "destination" : 1,
              "relation" : "nsubj"
            }, {
              "source" : 3,
              "destination" : 2,
              "relation" : "aux"
            }, {
              "source" : 3,
              "destination" : 7,
              "relation" : "nmod"
            }, {
              "source" : 3,
              "destination" : 10,
              "relation" : "punct"
            }, {
              "source" : 4,
              "destination" : 5,
              "relation" : "mwe"
            }, {
              "source" : 7,
              "destination" : 4,
              "relation" : "case"
            }, {
              "source" : 7,
              "destination" : 6,
              "relation" : "det"
            }, {
              "source" : 7,
              "destination" : 9,
              "relation" : "nmod"
            }, {
              "source" : 9,
              "destination" : 8,
              "relation" : "case"
            } ],
            "roots" : [ 3 ]
          }
        }
      } ]
    }
  },
  "mentions" : [ {
    "type" : "TextBoundMention",
    "id" : "T:-1364009445",
    "text" : "Water trucking",
    "labels" : [ "NounPhrase", "Entity" ],
    "tokenInterval" : {
      "start" : 0,
      "end" : 2
    },
    "characterStartOffset" : 0,
    "characterEndOffset" : 14,
    "sentence" : 0,
    "document" : "-1501028087",
    "keep" : true,
    "foundBy" : "simple-np++Decrease_ported_syntax_2_verb",
    "attachments" : [ {
      "type" : "Decrease",
      "mod" : "{\"trigger\":\"decreased\"}"
    } ]
  }, {
    "type" : "TextBoundMention",
    "id" : "T:-737414104",
    "text" : "cost of fuel",
    "labels" : [ "NounPhrase", "Entity" ],
    "tokenInterval" : {
      "start" : 7,
      "end" : 10
    },
    "characterStartOffset" : 40,
    "characterEndOffset" : 52,
    "sentence" : 0,
    "document" : "-1501028087",
    "keep" : true,
    "foundBy" : "simple-np",
    "attachments" : [ ]
  }, {
    "type" : "EventMention",
    "id" : "E:-1344481171",
    "text" : "Water trucking has decreased due to the cost of fuel",
    "labels" : [ "Causal", "DirectedRelation", "EntityLinker", "Event" ],
    "trigger" : {
      "type" : "TextBoundMention",
      "id" : "T:87479703",
      "text" : "due",
      "labels" : [ "Causal", "DirectedRelation", "EntityLinker", "Event" ],
      "tokenInterval" : {
        "start" : 4,
        "end" : 5
      },
      "characterStartOffset" : 29,
      "characterEndOffset" : 32,
      "sentence" : 0,
      "document" : "-1501028087",
      "keep" : true,
      "foundBy" : "dueToSyntax2-Causal",
      "attachments" : [ ]
    },
    "arguments" : {
      "cause" : [ {
        "type" : "TextBoundMention",
        "id" : "T:-737414104",
        "text" : "cost of fuel",
        "labels" : [ "NounPhrase", "Entity" ],
        "tokenInterval" : {
          "start" : 7,
          "end" : 10
        },
        "characterStartOffset" : 40,
        "characterEndOffset" : 52,
        "sentence" : 0,
        "document" : "-1501028087",
        "keep" : true,
        "foundBy" : "simple-np",
        "attachments" : [ ]
      } ],
      "effect" : [ {
        "type" : "TextBoundMention",
        "id" : "T:-1364009445",
        "text" : "Water trucking",
        "labels" : [ "NounPhrase", "Entity" ],
        "tokenInterval" : {
          "start" : 0,
          "end" : 2
        },
        "characterStartOffset" : 0,
        "characterEndOffset" : 14,
        "sentence" : 0,
        "document" : "-1501028087",
        "keep" : true,
        "foundBy" : "simple-np++Decrease_ported_syntax_2_verb",
        "attachments" : [ {
          "type" : "Decrease",
          "mod" : "{\"trigger\":\"decreased\"}"
        } ]
      } ]
    },
    "paths" : {
      "cause" : {
        "T:-737414104" : [ {
          "source" : 7,
          "destination" : 4,
          "relation" : "case"
        } ]
      },
      "effect" : {
        "T:-1364009445" : [ {
          "source" : 7,
          "destination" : 4,
          "relation" : "case"
        }, {
          "source" : 3,
          "destination" : 7,
          "relation" : "nmod_due_to"
        }, {
          "source" : 3,
          "destination" : 1,
          "relation" : "nsubj"
        } ]
      }
    },
    "tokenInterval" : {
      "start" : 0,
      "end" : 10
    },
    "characterStartOffset" : 0,
    "characterEndOffset" : 52,
    "sentence" : 0,
    "document" : "-1501028087",
    "keep" : true,
    "foundBy" : "dueToSyntax2-Causal",
    "attachments" : [ ]
  } ]
}