pyhornedowl.open_ontology

pyhornedowl.open_ontology(ontology: str, serialization: Literal['owl', 'rdf', 'ofn', 'owx'] | None = None, index_strategy=IndexCreationStrategy.OnQuery) PyIndexedOntology

Opens an ontology from a path or plain text.

If ontology is a path, the file is loaded. Otherwise, ontology is interpreted as an ontology in plain text. If no serialization is specified the serialization is guessed by the file extension or all parsers are tried until one succeeds.