query

ontology.query

Attributes

Name Description
prefixes

Functions

Name Description
build_filter
convert_greek_to_latin Converts Greek letters and the micro sign (µ) in the input text to their corresponding Latin names.
flatten_list Recursively flattens a list of lists.
get_children
get_class_relationships
get_parents
instance_class_relationship
iri2prefix
label_search
sparql_query

build_filter

ontology.query.build_filter(label, field, exact, case_sensitive)

convert_greek_to_latin

ontology.query.convert_greek_to_latin(text)

Converts Greek letters and the micro sign (µ) in the input text to their corresponding Latin names.

Args: text (str): The input text that may contain Greek letters or the micro sign.

Returns: str: The text with all Greek letters and the micro sign replaced by their Latin names.

flatten_list

ontology.query.flatten_list(nested_list)

Recursively flattens a list of lists.

Parameters

Name Type Description Default
nested_list list A list that may contain nested lists. required

Returns

Name Type Description
list List[Any] A flattened list with all elements from nested lists.

get_children

ontology.query.get_children(cl, onto=None)

get_class_relationships

ontology.query.get_class_relationships(class_iri)

get_parents

ontology.query.get_parents(cl, onto=None)

instance_class_relationship

ontology.query.instance_class_relationship(subject_iri, predicate='prov:used')

iri2prefix

ontology.query.iri2prefix(iri)

sparql_query

ontology.query.sparql_query(query_string, flatten_result=True, world=None)