JyutpingYaleConverter – Jyutping to Cantonese Yale

Specifics

Upper- or lowercase will be transfered between syllables, no special formatting according to anyhow defined standards will be guaranteed. Upper-/lowercase will be identified according to three classes: either the whole syllable is uppercase, only the initial letter is uppercase (titlecase) or otherwise the whole syllable is assumed being lowercase. For entities of single latin characters uppercase has precedence over titlecase, e.g. E5 will convert to ÉH in Cantonese Yale, not to Éh.

High Level vs. High Falling Tone

As described in CantoneseYaleOperator the Cantonese Yale romanisation system makes a distinction between the high level tone and the high falling tone in general while Jyutping does not. On conversion it is thus important to choose the correct mapping. This can be configured by applying the option yaleFirstTone when construction the converter (or telling the ReadingFactory which converter to use).

Example:

>>> from cjklib.reading import ReadingFactory
>>> f = ReadingFactory()
>>> f.convert(u'gwong2zau1waa2', 'Jyutping', 'CantoneseYale',
...     yaleFirstTone='1stToneFalling')
u'gwóngjàuwá'

Class

class cjklib.reading.converter.JyutpingYaleConverter(*args, **options)

Bases: cjklib.reading.converter.RomanisationConverter

Provides a converter between the Cantonese romanisation systems Jyutping and Cantonese Yale.

Parameters:
  • args – optional list of ReadingOperators to use for handling source and target readings.
  • options – extra options
  • dbConnectInst – instance of a DatabaseConnector, if none is given, default settings will be assumed.
  • sourceOperators – list of ReadingOperators used for handling source readings.
  • targetOperators – list of ReadingOperators used for handling target readings.
  • yaleFirstTone – tone in Yale which the first tone from Jyutping should be mapped to. Value can be '1stToneLevel' to map to the level tone with contour 55 or '1stToneFalling' to map to the falling tone with contour 53. This is only important if the target reading dialect uses diacritical tone marks.
DEFAULT_TONE_MAPPING
Mapping of Jyutping tones to Yale tones. Tone 1 can be changed via option ‘yaleFirstTone’.
convertBasicEntity(entity, fromReading, toReading)
classmethod getDefaultOptions()