open_ontology¶
- pyhornedowl.open_ontology(ontology: str, serialization: Literal2['owl', 'rdf', 'ofn', 'owx', 'omn', 'obo'] | None = None, index_strategy: IndexCreationStrategy = ...) Ontology¶
Opens an ontology from a path or plain text.
If
ontologyis a path, the file is loaded. Otherwise,ontologyis interpreted as an ontology in plain text. If no serialization is specified, it is guessed from the file extension (for a path) or detected from the content. Raises aValueErrorif the serialization cannot be determined.