Hume (indra.sources.hume)

Hume is a general purpose reading system developed by BBN.

Currently, INDRA can process JSON-LD files produced by Hume. When available, the API will be extended with access to the reader as a service.

Hume API (indra.sources.hume.api)

indra.sources.hume.api.process_jsonld_file(fname)[source]

Process a JSON-LD file in the new format to extract Statements.

Parameters:fname (str) – The path to the JSON-LD file to be processed.
Returns:A HumeProcessor instance, which contains a list of INDRA Statements as its statements attribute.
Return type:indra.sources.hume.HumeProcessor
indra.sources.hume.api.process_jsonld(jsonld)[source]

Process a JSON-LD string in the new format to extract Statements.

Parameters:jsonld (dict) – The JSON-LD object to be processed.
Returns:A HumeProcessor instance, which contains a list of INDRA Statements as its statements attribute.
Return type:indra.sources.hume.HumeProcessor

Hume Processor (indra.sources.hume.processor)

class indra.sources.hume.processor.HumeJsonLdProcessor(json_dict)[source]

This processor extracts INDRA Statements from Hume JSON-LD output.

Parameters:json_dict (dict) – A JSON dictionary containing the Hume extractions in JSON-LD format.
tree

objectpath.Tree – The objectpath Tree object representing the extractions.

statements

list[indra.statements.Statement] – A list of INDRA Statements that were extracted by the processor.

get_documents()[source]

Populate the sentences attribute with a dict keyed by document id.