Package cjklib :: Package reading :: Module converter :: Class CantoneseYaleDialectConverter
[hide private]
[frames] | no frames]

Class CantoneseYaleDialectConverter

source code


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

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.

Instance Methods [hide private]
str
convertBasicEntity(self, entity, fromReading, toReading)
Converts a basic entity (e.g.
source code

Inherited from EntityWiseReadingConverter: convertEntities

Inherited from ReadingConverter: __init__, convert, getOption

Inherited from ReadingConverter (private): _getFromOperator, _getToOperator

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods [hide private]

Inherited from ReadingConverter: getDefaultOptions

Class Variables [hide private]
  CONVERSION_DIRECTIONS = [('CantoneseYale', 'CantoneseYale')]
List of tuples for specifying supported conversion directions from reading A to reading B.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

convertBasicEntity(self, entity, fromReading, toReading)

source code 

Converts a basic entity (e.g. a syllable) in the source reading to the given target reading.

This method is called by convertEntities() and a single entity is given for conversion.

The default implementation will raise a NotImplementedError.

Parameters:
  • entity - string written in the source reading
  • fromReading - name of the source reading
  • toReading - name of the target reading
Returns: str
the entity converted to the toReading
Raises:
Overrides: EntityWiseReadingConverter.convertBasicEntity
(inherited documentation)