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.GetAllRecords(api=None, *args, **kwargs)[source]
- class indra_world.service.app.GetProjectCurations(api=None, *args, **kwargs)[source]
- class indra_world.service.app.GetProjectRecords(api=None, *args, **kwargs)[source]
- class indra_world.service.app.GetProjects(api=None, *args, **kwargs)[source]
- class indra_world.service.app.Notify(api=None, *args, **kwargs)[source]
- 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: