WadeGilesDialectConverter — Wade-Giles dialects



Convert to superscript numbers (default):
>>> from cjklib.reading import ReadingFactory
>>> f = ReadingFactory()
>>> f.convert(u'Ssŭ1ma3 Ch’ien1', 'WadeGiles', 'WadeGiles',
...     sourceOptions={'toneMarkType': 'numbers'})
u'Ss\u016d\xb9-ma\xb3 Ch\u2019ien\xb9'
Convert form without diacritic to standard form:
>>> f.convert(u'ch’eng', 'WadeGiles', 'WadeGiles',
...     sourceOptions={'diacriticE': 'e'})
Convert forms with lost umlaut:
>>> f.convert(u'hsu³-hun¹', 'WadeGiles', 'WadeGiles',
...     sourceOptions={'umlautU': 'u'})

See WadeGilesOperator for more examples.


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

Bases: cjklib.reading.converter.EntityWiseReadingConverter

Provides a converter for different representations of the Mandarin Chinese romanisation Wade-Giles.

  • 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)

Table Of Contents

Previous topic

PinyinDialectConverter — Hanyu Pinyin dialects

Next topic

PinyinWadeGilesConverter — Hanyu Pinyin to Wade-Giles

This Page