Transcription¶
-
class
corpustools.corpus.classes.lexicon.Transcription(seg_list)[source]¶ Transcription object, sequence of symbols
Parameters: - seg_list : list
List of segments that form the transcription. Elements in the list, can be Segments, strings, or BaseAnnotations
Attributes: - _list : list
List of strings representing segment symbols
- stress_pattern: dict
Dictionary with keys of segment indices and values of the stress for that segment
- boundaries : dict
Possible keys of ‘morpheme’ or ‘tone’ that keeps track of where morpheme or tone boundaries are inserted
Methods
__init__(seg_list)Initialize self. find(environment)Find instances of an EnvironmentFilter in the Transcription find_nonmatch(environment[, is_sets])Find all instances of an EnvironmentFilter in the Transcription that match in the middle segments, but don’t match on the sides match_segments(segments)Returns a matching segments from a list of segments with_word_boundaries()Return the string of segments with word boundaries surrounding them -
find(environment)[source]¶ Find instances of an EnvironmentFilter in the Transcription
Parameters: - environment : EnvironmentFilter
EnvironmentFilter to search for
Returns: - list
List of Environments that fit the EnvironmentFilter
-
find_nonmatch(environment, is_sets=False)[source]¶ Find all instances of an EnvironmentFilter in the Transcription that match in the middle segments, but don’t match on the sides
Parameters: - environment : EnvironmentFilter
EnvironmentFilter to search for
Returns: - list
List of Environments that fit the EnvironmentFilter’s middle but not the sides