medkit.core.annotation
medkit.core.annotation#
Classes:
|
Base annotation protocol that must be implemented by annotations classes of all modalities (text, audio, etc). |
Data:
Annotation type |
- class Annotation(*args, **kwargs)[source]#
Base annotation protocol that must be implemented by annotations classes of all modalities (text, audio, etc).
Annotations can be attached to
Document
objects and can containAttribute
objects.- Variables
uid (str) – Unique identifier of the annotation
label (str) – Label of the annotation, can be used to represent the “kind” of annotation. (ex: “sentence”, “disease”, etc)
keys (Set[str]) – Pipeline output keys to which the segment belongs to (cf
Pipeline
.)attrs (medkit.core.attribute_container.AttributeContainer) – Attributes of the annotation, stored in an
AttributeContainer
for easier access.
- AnnotationType#
Annotation type
alias of TypeVar(‘AnnotationType’, bound=
Annotation
)