REST API (indra_world.service.app
)
- class indra_world.service.app.EidosProcessJsonld(api=None, *args, **kwargs)[source]
- post()[source]
Process an EIDOS JSON-LD and return INDRA Statements.
- Parameters
jsonld (str) – The JSON-LD string to be processed.
grounding_ns (Optional[list]) – A list of name spaces for which INDRA should represent groundings, when given. If not specified or None, all grounding name spaces are propagated. If an empty list, no groundings are propagated. Example: [‘UN’, ‘WM’], Default: None
extract_filter (Optional[list]) – A list of relation types to extract. Valid values in the list are ‘influence’, ‘association’, ‘event’. If not given, all relation types are extracted. This argument can be used if, for instance, only Influence statements are of interest. Default: None
grounding_mode (Optional[str]) – Selects whether ‘flat’ or ‘compositional’ groundings should be extracted. Default: ‘flat’.
- Returns
statements – A list of extracted INDRA Statements.
- Return type
list[indra.statements.Statement.to_json()]
- class indra_world.service.app.EidosProcessText(api=None, *args, **kwargs)[source]
- post()[source]
Process text with EIDOS and return INDRA Statements.
- Parameters
text (str) – The text to be processed.
webservice (Optional[str]) – An Eidos reader web service URL to send the request to. If None, the reading is assumed to be done with the Eidos JAR rather than via a web service. Default: None
grounding_ns (Optional[list]) – A list of name spaces for which INDRA should represent groundings, when given. If not specified or None, all grounding name spaces are propagated. If an empty list, no groundings are propagated. Example: [‘UN’, ‘WM’], Default: None
extract_filter (Optional[list]) – A list of relation types to extract. Valid values in the list are ‘influence’, ‘association’, ‘event’. If not given, all relation types are extracted. This argument can be used if, for instance, only Influence statements are of interest. Default: None
grounding_mode (Optional[str]) – Selects whether ‘flat’ or ‘compositional’ groundings should be extracted. Default: ‘flat’.
- Returns
statements – A list of extracted INDRA Statements.
- Return type
list[indra.statements.Statement.to_json()]
- class indra_world.service.app.Notify(api=None, *args, **kwargs)[source]
- post()[source]
Add and process DART record.
- Parameters
identity (str) – Name of the reader.
version (str) – Reader version.
document_id (str) – ID of a document to process.
storage_key (str) – Key to store the record with.
output_version (str) – The output version (typically ontology version).
labels (list of str) – A list of labels for the output.
tenants (list of str) – A list of tenants for the output.
- class indra_world.service.app.SofiaProcessJson(api=None, *args, **kwargs)[source]
- post()[source]
Process a Sofia JSON and return INDRA Statements.
- Parameters
json (str) – The JSON string to be processed.
extract_filter (Optional[list]) – A list of relation types to extract. Valid values in the list are ‘influence’, ‘association’, ‘event’. If not given, all relation types are extracted. This argument can be used if, for instance, only Influence statements are of interest. Default: None
grounding_mode (Optional[str]) – Selects whether ‘flat’ or ‘compositional’ groundings should be extracted. Default: ‘flat’.
- Returns
statements – A list of extracted INDRA Statements.
- Return type
list[indra.statements.Statement.to_json()]
- class indra_world.service.app.SubmitCurations(api=None, *args, **kwargs)[source]
- post()[source]
Submit curations.
- Parameters
- Returns
mappings – For any statement matches hashes that have changed due to the curations submitted here, the new hash (after applying the curation) is given. Statements whose hash didn’t change, or if a curation for some reason couldn’t be applied, the given statement is not added to the return value.
- Return type