Skip to content

ontocast.onto.annotation

Annotation predicates: literals that describe a node rather than assert a value.

Attributes

ANNOTATION_PREDICATES = frozenset({RDFS.label, RDFS.comment, DCTERMS.description}) module-attribute

Functions:

is_annotation(predicate)

True for a label, comment, description or SKOS term: a number inside one is prose, not data, and the triple states nothing about the node.

Source code in ontocast/onto/annotation.py
def is_annotation(predicate: Node) -> bool:
    """True for a label, comment, description or SKOS term: a number inside one
    is prose, not data, and the triple states nothing about the node."""
    return predicate in ANNOTATION_PREDICATES or str(predicate).startswith(
        _SKOS_NAMESPACE
    )