emmopy¶
emmopy.emmopy
¶
Automagically retrieve the EMMO utilizing
ontopy.get_ontology
.
get_emmo(inferred=True)
¶
Returns the current version of emmo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inferred |
Optional[bool] |
Whether to import the inferred version of emmo or not. Default is True. |
True |
Returns:
Type | Description |
---|---|
Ontology |
The loaded emmo ontology. |
Source code in emmopy/emmopy.py
def get_emmo(inferred: Optional[bool] = True) -> "Ontology":
"""Returns the current version of emmo.
Args:
inferred: Whether to import the inferred version of emmo or not.
Default is True.
Returns:
The loaded emmo ontology.
"""
name = "emmo-inferred" if inferred in [True, None] else "emmo"
return get_ontology(name).load(prefix_emmo=True)