Skip to content
qiuhaoling edited this page Aug 28, 2020 · 14 revisions

Output format (JSON-LD)

Hume's JSON-LD output format is described in the following tables. This format is developed jointly with University of Arizona, so the format is similar to https://github.com/clulab/eidos/wiki/JSON-LD. However, there are a couple of differences that we highlight in bold font.

JSON-LD element

Name Property Type Description
Corpus @type "Corpus" A corpus is typed.
documents [Document] It has a list of documents
extractions [Extraction] and a set of mixed extractions.
Document @type "Document" A document is typed
@id IRI and provided an ID.
location string a human-interpretable indication of where the text was found,
dct DCT a document creation time,
sentences [Sentence] and a list of sentences.
DCT @type "DCT" A document creation time is typed
@id IRI and provided an ID.
text string It has a text.
start string It starts (in ISO-8601 format)
end string and ends (in ISO-8601 format).
Sentence @type "Sentence" A sentence is typed
@id IRI and provided an ID.
text string It has a text,
Extraction Please look at Extraction
Grounding @type "Grounding" A grounding is typed.
name "bbn"
ontologyConcept string It has an ontology concept. A path like string in WM ontology
value string and a matching value.
Provenance @type "Provenance" A "provenance" is typed.
document {@id(Document)} It has a document ID referring to a Document,
documentCharPositions [Interval] a set of intervals for characters within the document,
sentence {@id(Sentence)} a sentence ID referring to a Sentence,
sentenceWordPositions [Interval] and a set of intervals for words within the sentence.
Interval @type "Interval" An interval is typed.
start integer For sentenceWordPositions, this is an inclusive, 1-based index of the first word of the interval in the sentence. For documentCharPositions, it is an inclusive, 0-based index of the first character of the interval in the document
end integer For sentenceWordPositions, this is an inclusive, 1-based index of the last word of the interval in the sentence. For documentCharPositions, it is an inclusive, 0-based index of the last character of the interval in the document.
State @type "State" A state is typed.
type string See details below.
text string a text,
Trigger @type "Trigger" A trigger is typed.
text string It has a text for the event
provenance [Provenance] and a set of provenance values.
head text string It has a text for the head word
Argument @type "Argument" An argument is typed.
type string It has a description of type from the table below,
value {@id(Extraction)} and an ID referring to the extraction.
TimeInterval @type "TimeInterval" A time interval is typed
start string It starts (in ISO-8601 format)
end string and ends (in ISO-8601 format).
TimeValueMention @type "TimeValueMention"
text string
provenance [Provenance]
PropertyMention @type "PropertyMention"
text string
provenance [Provenance]
Count @type "Count" A count is typed
@id IRI and provided with an ID.
value double It has a numeric value,
modifier "NoModifier", "Approximate", "Min", or "Max" a required modifier,
unit "Absolute", "Daily", "Weekly", "Monthly", or "Percentage" and a required unit.
OntologyMeta @type "OntologyMeta" A OntologyMeta is typed
URL string Original URL
commit string Commit hash

Argument role type table

Extraction type Extraction subtype Argument role types Argument role subtypes Notes
"concept" This is just something being there.
"entity"
"event"
"has_actor"
"has_active_actor"
"has_affected_actor"
"has_location"
"has_origin_location"
"has_destination_location"
"has_intermediate_location"
"has_time"
"has_start_time"
"has_end_time"
"has_duration"
"has_artifact"
"has_theme"
"has_property"
"relation" Link between concepts
"causation" This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"precondition" The "source" concept must have occurred/begun for the "destination" concept to happen. This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"catalyst" The "source" concept increases the intensity of the "destination" concept, but does not cause the "destination" concept. This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"mitigation" The "source" concept decreases the intensity of the "destination" concept, but does not cause the "destination" concept. This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"prevention" The "source" concept will stop or prevent the 'destination' concept. This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"temporallyPrecedes" The "source" concept occurs before the 'destination' concept. This is a directed relation.
"source" This source may appear multiple times.
"destination" This destination may appear multiple times.
"unification" This is a directed relation.
"group" The argument must appear only once.
"member" The argument must appear only once.
"coreference" This is a directed relation.
"anchor" The argument must appear only once.
"reference" The argument must appear only once.
State type Value type Notes
polarity "Positive" "Negative" Negative when it is explicitly indicated that the Event did not occur. All other Events are Positive.
modality Asserted when the author or speaker makes reference to it as though it were a real occurrence. All other Events are Other.
genericity Specific if it is a singular occurrence at a particular place and time, or a finite set of such occurrences. All other Events are Generic.
tense
direction_of_change "Unspecified" "Increase" "Decrease"
magnitude float Intensity of the event. Scores range from 0 to 1. For instance, "low rainfall" and "high rainfall" are low magnitude and high magnitude respectively.
Extraction type Extraction subtype hume type Property Type Description
"concept" "entity" EntityMention @type "Extraction"
@id IRI
type "concept"
subtype "entity"
labels ["Entity"]
text string
counts [Count] Optional
geoname_id string Optional
canonicalName string Optional
grounding [Grounding]
provenance [Provenance]
"relation" "coreference" Entity @type "Extraction"
@id IRI
type "relation"
subtype "coreference"
labels ["DirectedRelation"]
arguments [Argument]
"concept" "event" EventGroup @type "Extraction"
@id IRI
type "concept"
subtype "event"
labels ["EventGroup"]
grounding [Grounding] Hard-coded to event group node
"relation" "unification" EventGroupToEvent @type "Extraction"
@id IRI
type "relation"
subtype "unification"
arguments [Argument]
"relation" "causation"|| "precondition"|| "prevention"|| "catalyst"|| "mitigation",|| "temporallyPrecedes" EventEventRelation @type "Extraction"
@id IRI
type "relation"
subtype "causation"|| "precondition"|| "prevention"|| "catalyst"|| "mitigation",|| "temporallyPrecedes"
labels ["DirectedRelation"]
arguments [Argument]
provenance [Provenance]
"concept" "entity" TimeValueMention @type "Extraction"
@id IRI
type "concept"
subtype "entity"
labels ["Entity"]
canonicalName string
grounding [Grounding] Hard-coded to "/wm_compositional/time"
text string
mentions [TimeValueMention]
timeInterval [TimeInterval] Optional
"concept" "entity" PropertyMention @type "Extraction"
@id IRI
type "concept"
subtype "entity"
labels ["Entity"]
canonicalName string
grounding [Grounding] "/wm/property/*"
mentions [PropertyMention]
"concept" "event" EventMention @type "Extraction"
@id IRI
type "concept"
subtype "event"
labels ["Event"]
trigger Trigger
provenance [Provenance]
arguments [Argument]
states [State]
text string
canonicalName string,same as text
grounding [Grounding]
head text string or "NA"

This example shows a valid JSON-LD, generated by running Hume over the sentence "Hunger caused displacement in South Sudan in 2018."

{
    "@context": {
        "Argument": "https://github.com/BBN-E/Hume/wiki#Argument", 
        "Corpus": "https://github.com/BBN-E/Hume/wiki#Corpus", 
        "Count": "https://github.com/BBN-E/Hume/wiki#Count", 
        "Document": "https://github.com/BBN-E/Hume/wiki#Document", 
        "Extraction": "https://github.com/BBN-E/Hume/wiki#Extraction", 
        "Grounding": "https://github.com/BBN-E/Hume/wiki#Grounding", 
        "Interval": "https://github.com/BBN-E/Hume/wiki#Interval", 
        "Provenance": "https://github.com/BBN-E/Hume/wiki#Provenance", 
        "Sentence": "https://github.com/BBN-E/Hume/wiki#Sentence", 
        "State": "https://github.com/BBN-E/Hume/wiki#State", 
        "TimeInterval": "https://github.com/BBN-E/Hume/wiki#TimeInterval", 
        "TimeValueMention": "https://github.com/BBN-E/Hume/wiki#TimeValueMention", 
        "Trigger": "https://github.com/BBN-E/Hume/wiki#Trigger", 
        "OntologyMeta": "https://github.com/BBN-E/Hume/wiki#OntologyMeta"
    }, 
    "@type": "Corpus", 
    "ontologyMeta": {
        "@type": "OntologyMeta", 
        "URL": "https://github.com/WorldModelers/Ontologies/blob/8c3d191c837e973a9ebfacaa78d3a96ab1701981/wm_metadata.yml", 
        "commit": "8c3d191c837e973a9ebfacaa78d3a96ab1701981"
    }, 
    "documents": [
        {
            "@id": "HUME_MIGRATION_ARG_UNITTEST_082019", 
            "@type": "Document", 
            "location": "NON_EXISTED", 
            "sentences": [
                {
                    "@id": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0", 
                    "@type": "Sentence", 
                    "text": "Hunger caused displacement in South Sudan in 2018."
                }
            ]
        }
    ], 
    "extractions": [
        {
            "@id": "Entity-ENG_NW_20190520_WMMIGRE_TEST-0-1", 
            "@type": "Extraction", 
            "canonicalName": "South Sudan", 
            "geoname_id": "7909807", 
            "grounding": [
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/entity/geo-location", 
                    "value": 0.8
                }
            ], 
            "labels": [
                "Entity"
            ], 
            "provenance": [
                {
                    "@type": "Provenance", 
                    "document": {
                        "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                    }, 
                    "documentCharPositions": {
                        "@type": "Interval", 
                        "end": 41, 
                        "start": 31
                    }, 
                    "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                }
            ], 
            "subtype": "entity", 
            "text": "South Sudan", 
            "type": "concept"
        }, 
        {
            "@id": "Event-ENG_NW_20190520_WMMIGRE_TEST-0", 
            "@type": "Extraction", 
            "arguments": [
                {
                    "@type": "Argument", 
                    "type": "has_location", 
                    "value": {
                        "@id": "Entity-ENG_NW_20190520_WMMIGRE_TEST-0-1"
                    }
                }, 
                {
                    "@type": "Argument", 
                    "type": "has_time", 
                    "value": {
                        "@id": "Time-1"
                    }
                }
            ], 
            "canonicalName": "displacement in South Sudan", 
            "grounding": [
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/causal_factor/movement/movement/human displacement", 
                    "value": 0.17
                }, 
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/indicator_and_reported_property/conflict/population displacement", 
                    "value": 0.17
                }
            ], 
            "labels": [
                "Event"
            ], 
            "provenance": [
                {
                    "@type": "Provenance", 
                    "document": {
                        "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                    }, 
                    "documentCharPositions": {
                        "@type": "Interval", 
                        "end": 26, 
                        "start": 15
                    }, 
                    "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                }
            ], 
            "states": [
                {
                    "@type": "State", 
                    "text": "Asserted", 
                    "type": "modality"
                }, 
                {
                    "@type": "State", 
                    "text": "Specific", 
                    "type": "genericity"
                }, 
                {
                    "@type": "State", 
                    "text": "Positive", 
                    "type": "polarity"
                },
                {
                    "@type": "State", 
                    "text": 0.5, 
                    "type": "magnitude"
                },
                {
                    "@type": "State", 
                    "text": "Unspecified", 
                    "type": "direction_of_change"
                }
            ], 
            "subtype": "event", 
            "text": "displacement in South Sudan", 
            "trigger": {
                "@type": "Trigger", 
                "head text": "displacement", 
                "provenance": [
                    {
                        "@type": "Provenance", 
                        "document": {
                            "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                        }, 
                        "documentCharPositions": {
                            "@type": "Interval", 
                            "end": 26, 
                            "start": 15
                        }, 
                        "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                    }
                ], 
                "text": "displacement in South Sudan"
            }, 
            "type": "concept"
        }, 
        {
            "@id": "Time-1", 
            "@type": "Extraction", 
            "canonicalName": "2018", 
            "grounding": [
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/time", 
                    "value": 0.75
                }
            ], 
            "labels": [
                "Entity"
            ], 
            "mentions": [
                {
                    "@type": "TimeValueMention", 
                    "provenance": [
                        {
                            "@type": "Provenance", 
                            "document": {
                                "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                            }, 
                            "documentCharPositions": {
                                "@type": "Interval", 
                                "end": 49, 
                                "start": 46
                            }, 
                            "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                        }
                    ], 
                    "text": "2018"
                }
            ], 
            "subtype": "entity", 
            "timeInterval": [
                {
                    "@type": "TimeInterval", 
                    "duration": 31535999, 
                    "end": "2018-12-31T23:59", 
                    "start": "2018-01-01T00:00"
                }
            ], 
            "type": "concept"
        }, 
        {
            "@id": "Event-ENG_NW_20190520_WMMIGRE_TEST-1", 
            "@type": "Extraction", 
            "arguments": [
                {
                    "@type": "Argument", 
                    "type": "has_time", 
                    "value": {
                        "@id": "Time-2"
                    }
                }
            ], 
            "canonicalName": "Hunger", 
            "grounding": [
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/causal_factor/condition/famine", 
                    "value": 0.75
                }
            ], 
            "labels": [
                "Event"
            ], 
            "provenance": [
                {
                    "@type": "Provenance", 
                    "document": {
                        "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                    }, 
                    "documentCharPositions": {
                        "@type": "Interval", 
                        "end": 6, 
                        "start": 1
                    }, 
                    "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                }
            ], 
            "states": [
                {
                    "@type": "State", 
                    "text": "Asserted", 
                    "type": "modality"
                }, 
                {
                    "@type": "State", 
                    "text": "Specific", 
                    "type": "genericity"
                }, 
                {
                    "@type": "State", 
                    "text": "Positive", 
                    "type": "polarity"
                },
                {
                    "@type": "State", 
                    "text": 0.5, 
                    "type": "magnitude"
                },
                {
                    "@type": "State", 
                    "text": "Unspecified", 
                    "type": "direction_of_change"
                }
            ], 
            "subtype": "event", 
            "text": "Hunger", 
            "trigger": {
                "@type": "Trigger", 
                "head text": "Hunger", 
                "provenance": [
                    {
                        "@type": "Provenance", 
                        "document": {
                            "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                        }, 
                        "documentCharPositions": {
                            "@type": "Interval", 
                            "end": 6, 
                            "start": 1
                        }, 
                        "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                    }
                ], 
                "text": "Hunger"
            }, 
            "type": "concept"
        }, 
        {
            "@id": "Time-2", 
            "@type": "Extraction", 
            "canonicalName": "2018", 
            "grounding": [
                {
                    "@type": "Grounding", 
                    "name": "bbn", 
                    "ontologyConcept": "/wm/concept/time", 
                    "value": 0.75
                }
            ], 
            "labels": [
                "Entity"
            ], 
            "mentions": [
                {
                    "@type": "TimeValueMention", 
                    "provenance": [
                        {
                            "@type": "Provenance", 
                            "document": {
                                "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                            }, 
                            "documentCharPositions": {
                                "@type": "Interval", 
                                "end": 49, 
                                "start": 46
                            }, 
                            "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                        }
                    ], 
                    "text": "2018"
                }
            ], 
            "subtype": "entity", 
            "timeInterval": [
                {
                    "@type": "TimeInterval", 
                    "duration": 31535999, 
                    "end": "2018-12-31T23:59", 
                    "start": "2018-01-01T00:00"
                }
            ], 
            "type": "concept"
        }, 
        {
            "@id": "Relation-ENG_NW_20190520_WMMIGRE_TEST-0", 
            "@type": "Extraction", 
            "arguments": [
                {
                    "@type": "Argument", 
                    "type": "source", 
                    "value": {
                        "@id": "Event-ENG_NW_20190520_WMMIGRE_TEST-1"
                    }
                }, 
                {
                    "@type": "Argument", 
                    "type": "destination", 
                    "value": {
                        "@id": "Event-ENG_NW_20190520_WMMIGRE_TEST-0"
                    }
                }
            ], 
            "labels": [
                "DirectedRelation"
            ], 
            "provenance": [
                {
                    "@type": "Provenance", 
                    "document": {
                        "@id": "HUME_MIGRATION_ARG_UNITTEST_082019"
                    }, 
                    "documentCharPositions": {
                        "@type": "Interval", 
                        "end": 26, 
                        "start": 1
                    }, 
                    "sentence": "Sentence-ENG_NW_20190520_WMMIGRE_TEST-0"
                }
            ], 
            "subtype": "causation", 
            "type": "relation"
        }
    ]
}
Clone this wiki locally