mmif.vocabulary package

Submodules

mmif.vocabulary.annotation_types module

class mmif.vocabulary.annotation_types.AnnotationTypes(type_uri, fuzzymode=True)[source]

Bases: AnnotationTypesBase

This class contains the CLAMS annotation types defined in the spec version 1.1.0 as class variables.

Annotation = http://mmif.clams.ai/vocabulary/Annotation/v6
Region = http://mmif.clams.ai/vocabulary/Region/v5
TimePoint = http://mmif.clams.ai/vocabulary/TimePoint/v5
Interval = http://mmif.clams.ai/vocabulary/Interval/v5
Span = http://mmif.clams.ai/vocabulary/Span/v5
Token = http://mmif.clams.ai/vocabulary/Token/v1
Sentence = http://mmif.clams.ai/vocabulary/Sentence/v1
Paragraph = http://mmif.clams.ai/vocabulary/Paragraph/v1
NamedEntity = http://mmif.clams.ai/vocabulary/NamedEntity/v1
NounChunk = http://mmif.clams.ai/vocabulary/NounChunk/v1
VerbChunk = http://mmif.clams.ai/vocabulary/VerbChunk/v1
TimeFrame = http://mmif.clams.ai/vocabulary/TimeFrame/v6
Chapter = http://mmif.clams.ai/vocabulary/Chapter/v6
Polygon = http://mmif.clams.ai/vocabulary/Polygon/v5
BoundingBox = http://mmif.clams.ai/vocabulary/BoundingBox/v5
VideoObject = http://mmif.clams.ai/vocabulary/VideoObject/v5
Relation = http://mmif.clams.ai/vocabulary/Relation/v5
Alignment = http://mmif.clams.ai/vocabulary/Alignment/v1

mmif.vocabulary.base_types module

class mmif.vocabulary.base_types.TypesBase(type_uri: str)[source]

Bases: object

Base class for arbitrary vocabulary type. This class provides bisic initializer, comparators, and (de-)serialization methods.

base_uri: str
shortname: str
old_lapps_type_shortnames = {'Markable', 'NamedEntity', 'NounChunk', 'Paragraph', 'Sentence', 'Token', 'VerbChunk'}
fuzzy_eq: bool
parse_names(type_uri: str)[source]
static attype_iri_isdocument(iri)[source]
classmethod from_str(string: str)[source]
get_prefix()[source]
set_prefix(prefix)[source]
mmif.vocabulary.base_types.ThingTypesBase[source]

alias of TypesBase

class mmif.vocabulary.base_types.ClamsTypesBase(type_uri, fuzzymode=True)[source]

Bases: TypesBase

Base class for CLAMS vocabulary types. Main This class adds handling of MMIF specification versions in initializer and comparators.

version: str
dev_version: ClassVar[str] = 'develop'
parse_names(type_uri: str)[source]
normalize_attype_vers()[source]
class mmif.vocabulary.base_types.AnnotationTypesBase(type_uri, fuzzymode=True)[source]

Bases: ClamsTypesBase

Inherit from this class to build your own custom annotation vocabularies.

class mmif.vocabulary.base_types.DocumentTypesBase(type_uri, fuzzymode=True)[source]

Bases: ClamsTypesBase

Inherit from this class to build your own custom document vocabularies.

class mmif.vocabulary.base_types.ThingType(type_uri: str)[source]

Bases: TypesBase

This class contains the topmost CLAMS thing type defined in the spec version 1.1.0 as a class variable.

Thing = http://mmif.clams.ai/vocabulary/Thing/v1

mmif.vocabulary.document_types module

class mmif.vocabulary.document_types.DocumentTypes(type_uri, fuzzymode=True)[source]

Bases: DocumentTypesBase

This class contains the CLAMS document types defined in the spec version 1.1.0 as class variables.

Document = http://mmif.clams.ai/vocabulary/Document/v1
VideoDocument = http://mmif.clams.ai/vocabulary/VideoDocument/v1
AudioDocument = http://mmif.clams.ai/vocabulary/AudioDocument/v1
ImageDocument = http://mmif.clams.ai/vocabulary/ImageDocument/v1
TextDocument = http://mmif.clams.ai/vocabulary/TextDocument/v1