Vocabulary
Vocabulary(
prefix: str,
uri: str,
version: str,
codecs: tuple[TypeCodec, ...],
temporal_systems: Mapping[str, TemporalSystem] = dict(),
tonal_systems: Mapping[str, TonalSystem] = dict(),
)A published vocabulary: its identity, its types, and its systems.
System identifiers are given unqualified ("metrical"); in a document they carry the vocabulary’s prefix ("wsmn:metrical"), except for the omk vocabulary, whose names are written bare.
Attributes
| Name | Description |
|---|---|
| prefix | |
| uri | |
| version | |
| codecs | |
| temporal_systems | |
| tonal_systems |
Methods
| Name | Description |
|---|---|
| accepts | Whether a document requiring version of this vocabulary can be read (§6.3): |
accepts
accepts(version: str)Whether a document requiring version of this vocabulary can be read (§6.3): the same major version and no later minor one, or, before 1.0, exactly this version.
>>> from openmusickit.io.omk_json.core import CORE
>>> CORE.version, CORE.accepts("0.1"), CORE.accepts("0.0"), CORE.accepts("1.0")
('0.1', True, False, False)