cjklib.reading.operator.CantoneseIPAOperator is an experimental implementation of a transcription of Cantonese into the International Phonetic Alphabet (IPA).
Features:
CantonteseIPAOperator does not supply the same closed set of syllables as other ReadingOperators as IPA provides different ways to represent pronunciation. Because of that a user defined IPA syllable will not easily map to another transcription system and thus only basic support is provided for this direction.
This operator supplies an additional method getOnsetRhyme() which allows breaking down syllables into their onset and rhyme.
Tones in IPA can be expressed using different schemes. The following schemes are implemented here:
The operator comes with three different set of tones to accommodate the user but at the same time handle all different tone types. This setting is controlled by option 'stopTones', where 'none' will force the set of 7 basic tones, 'general' will add the three stop tones found in STOP_TONES, and 'explicit' will add one stop tone for each possible vowel length i.e. short and long, making up the maximum count of 13. Internally the set with explicit stop tones is used.
(摩登廣州話語音學). Walter de Gruyter, 1997, ISBN 3-11-014893-5.
Cantonese Linguistics. Linguistic Society of Hong Kong, 1998, ISBN 962-7578-04-5.
See also
Bases: cjklib.reading.operator.TonalIPAOperator
Provides an operator on strings of the Cantonese language written in the International Phonetic Alphabet (IPA).
Todo
Parameters: |
|
---|
Gets the base tone for stop tones. The returned tone is one out of TONES.
Parameter: | tone (str) – tone |
---|---|
Return type: | str |
Returns: | base tone |
Gets the explicit tone for the given plain syllable and base tone.
In case the 6 (7) base tones are used, the stop tone value can be deduced from the given syllable. The stop tone returned will be even more precise in denoting the vowel length that influences the tone contour.
Parameters: |
|
---|---|
Return type: | str |
Returns: | explicit tone |
Raises InvalidEntityError: | |
if the entity is invalid. |
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 base tone for the given tone mark.
Parameter: | toneMark (str) – tone mark representation of the tone |
---|---|
Return type: | str |
Returns: | tone |
Raises InvalidEntityError: | |
if the toneMark does not exist. |
Checks if the given plain syllable can occur with stop tones which is the case for syllables with unreleased finals.
Parameter: | plainEntity (str) – entity without tonal information |
---|---|
Return type: | bool |
Returns: | True if given syllable can occur with stop tones, False otherwise |
Checks if the given plain entity and tone combination is valid.
Only syllables with unreleased finals occur with stop tones, other forms must not (see hasStopTone()).
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if given combination is valid, False otherwise |