INDRA WorldOntology (indra.ontology.world_ontology)¶
Module containing the implementation of an IndraOntology for the World Modelers use case.
This script loads the ontologies for Eidos and Hume and generates RDFs.
The script can handle any ontology which uses the same format (yaml ontology following the namespace defined at eidos_ns).
-
class
indra.ontology.world.ontology.WorldOntology(url)[source]¶ Represents the ontology used for World Modelers applications.
Parameters: url (str) – The URL pointing to a World Modelers ontology YAML. -
url¶ The URL pointing to a World Modelers ontology YAML.
Type: str
-
yml¶ The ontology YAML as loaded by the yaml package from the URL.
Type: list
-
add_entry(entry, examples=None)[source]¶ Add a new ontology entry with examples.
This works by adding the entry to the yml attribute first and then reloading the entire yaml to build a new graph.
Parameters: - entry (str) – The new entry.
- examples (list of str) – Examples for the new entry.
-