annotations.Align.models package¶
Subpackages¶
- annotations.Align.models.acm package
- Submodules
- annotations.Align.models.acm.acfeatures module
- annotations.Align.models.acm.acmbaseio module
- annotations.Align.models.acm.acmodel module
- annotations.Align.models.acm.acmodelhtkio module
- annotations.Align.models.acm.hmm module
- annotations.Align.models.acm.htkscripts module
- annotations.Align.models.acm.htktrain module
- annotations.Align.models.acm.phoneset module
- annotations.Align.models.acm.readwrite module
- annotations.Align.models.acm.tiedlist module
- Module contents
- annotations.Align.models.slm package
Submodules¶
annotations.Align.models.modelsexc module¶
- filename
sppas.src.annotations.Align.models.modelsexc.py
- author
Brigitte Bigi
- contact
- summary
Exceptions for Alignment ‘models’ package.
- exception annotations.Align.models.modelsexc.ArpaFileError(line)[source]¶
Bases:
OSError
:ERROR 7210:.
Expected a standard arpa file. Error with line: {line}.
- exception annotations.Align.models.modelsexc.MioEncodingError(filename, error_name)[source]¶
Bases:
UnicodeDecodeError
:ERROR 7500:.
The file {!s:s} contains non UTF-8 characters: {:s}.
- exception annotations.Align.models.modelsexc.MioFileError(name)[source]¶
Bases:
OSError
:ERROR 7515:.
No model found or empty model in {!s:s}.
- exception annotations.Align.models.modelsexc.MioFileFormatError(name)[source]¶
Bases:
OSError
:ERROR 7505:.
Fail formats: unrecognized file format {!s:s}.
- exception annotations.Align.models.modelsexc.MioFolderError(folder)[source]¶
Bases:
OSError
:ERROR 7510:.
Fail formats: the folder {!s:s} does not contain a known model.
- exception annotations.Align.models.modelsexc.ModelsDataTypeError(data_name, expected_type, data_type)[source]¶
Bases:
TypeError
:ERROR 7010:.
Expected a {data_name} of type {expected_type}. Got {data_type} instead.
- exception annotations.Align.models.modelsexc.NgramCountValueError(min_value, got_value)[source]¶
Bases:
ValueError
:ERROR 7120:.
Expected a minimum count value of {min_value}. Got {got_value} instead.
annotations.Align.models.tiermapping module¶
- filename
sppas.src.annotations.Align.models.tiermapping.py
- author
Brigitte Bigi
- contact
- summary
Map tags of annotated tiers.
- class annotations.Align.models.tiermapping.sppasMappingTier(dict_name=None)[source]¶
Bases:
sppas.src.resources.mapping.sppasMapping
Map content of annotations of a tier from a mapping table.
A conversion table is used to map symbols of labels of a tier with new symbols. This class can convert either individual symbols or strings of symbols (syllables, words, …) if a separator is given.
Any symbols in the transcription tier which is not in the conversion table is replaced by a specific symbol (by default ‘*’).
- __init__(dict_name=None)[source]¶
Create a sppasMappingTier instance.
- Parameters
dict_name – (str) The mapping dictionary.
- map_annotation(annotation)[source]¶
Run the mapping process on an annotation.
- Parameters
annotation – (sppasAnnotation) annotation with symbols to map
- Returns
a new annotation, with the same ‘id’ as the given one
- map_label(label)[source]¶
Run the mapping process on a label.
- Parameters
label – (sppasLabel) label with symbols to map
- Returns
sppasLabel()
- map_tag(tag)[source]¶
Run the mapping process on a tag.
- Parameters
tag – (sppasTag) tag with symbols to map
- Returns
List of sppasTag()
- map_tier(tier)[source]¶
Run the mapping process on an input tier.
- Parameters
tier – (sppasTier) The tier instance to map label symbols.
- Returns
a new tier