cjklib.reading.operator.MandarinIPAOperator is an implementation of a transcription of Standard Mandarin into the International Phonetic Alphabet (IPA).
Features:
Tones in IPA can be expressed using different schemes. The following schemes are implemented here:
Unlike other operators for Mandarin, distinction is made for six different tonal occurrences. The third tone is affected by tone sandhi and basically two different tone contours exist. Therefore getTonalEntity() and splitEntityTone() work with string representations as tones defined in TONES. Same behaviour as found in other operators for Mandarin can be achieved by simply using the first character of the given string:
>>> from cjklib.reading import operator
>>> ipaOp = operator.MandarinIPAOperator(toneMarkType='ipaToneBar')
>>> syllable, toneName = ipaOp.splitEntityTone(u'mən˧˥')
>>> tone = int(toneName[0])
The implemented schemes render tone information differently. Mapping might lose information so a full back-transformation can not be guaranteed.
Bases: cjklib.reading.operator.TonalIPAOperator
Provides an operator on strings in Mandarin Chinese written in the International Phonetic Alphabet (IPA).
Parameters: |
|
---|
Splits the given plain syllable into onset (initial) and rhyme (final).
Parameter: | plainSyllable (str) – syllable in IPA without tone marks |
---|---|
Return type: | tuple of str |
Returns: | tuple of syllable onset and rhyme |
Raises InvalidEntityError: | |
if the entity is invalid (e.g. syllable nucleus or tone invalid). |
Gets the list of plain entities supported by this reading. These entities will carry no tone mark.
Return type: | set of str |
---|---|
Returns: | set of supported syllables |