CantoneseYaleDialectConverter — Cantonese Yale dialects

Specifics

High Level vs. High Falling Tone

As described in CantoneseYaleOperator the abbreviated form of the Cantonese Yale romanisation system which uses numbers as tone marks makes no distinction between the high level tone and the high falling tone. On conversion to the form with diacritical marks it is thus important to choose the correct mapping. This can be configured by applying a special instance of a CantoneseYaleOperator (or telling the ReadingFactory which operator to use).

Example:

>>> from cjklib.reading import ReadingFactory
>>> f = ReadingFactory()
>>> f.convert(u'gwong2jau1wa2', 'CantoneseYale', 'CantoneseYale',
...     sourceOptions={'toneMarkType': 'numbers',
...         'yaleFirstTone': '1stToneFalling'})
u'gwóngjàuwá'

Class

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

Bases: cjklib.reading.converter.EntityWiseReadingConverter

Provides a converter for different representations of the Cantonese Yale romanisation system.

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.
convertBasicEntity(entity, fromReading, toReading)