Documentation Index
Fetch the complete documentation index at: https://docs.encord.com/llms.txt
Use this file to discover all available pages before exploring further.
generate_feature_node_hash
def generate_feature_node_hash() -> str
Utility function to generate an 8-character hex string.
Ontology Objects
This class is DEPRECATED. We recommend using Ontology
from_dict
@classmethod
def from_dict(cls, ontology_dict: Dict)
Convert python dictionary too an Ontology object.
Arguments:
ontology_dict - The dictionary to convert.
add_object
def add_object(name: str, shape: ObjectShape) -> None
Add an OntologyObject to the ontology.
Arguments:
name - A descriptive name of the object.
shape - The shape of the object.
add_classification
def add_classification(name: str,
classification_type: ClassificationType,
required: bool,
options: Optional[Iterable[str]] = None) -> None
Add a classification to the ontology.
Arguments:
name - A descriptive name of the classification.
classification_type - The type of the classification.
required - Indicate whether annotating this classification is required.
options - Nested classification options.
to_dict
Convert the ontology object to a python dictionary.