PinyinBrailleConverter – Hanyu Pinyin to Braille

Specifics

Conversion from Braille to Pinyin is ambiguous. The syllable pairs mo/me, e/o and le/lo will yield an AmbiguousConversionError. Furthermore conversion from Pinyin to Braille is lossy if tones are omitted, which seems to be frequent in writing Braille for Chinese. Braille doesn’t mark the fifth tone, so converting back to Pinyin will give syllables without a tone mark the fifth tone, changing originally unknown ones. See MandarinBrailleOperator.

Examples

Convert from Pinyin to Braille using the ReadingFactory:

>>> from cjklib.reading import ReadingFactory
>>> f = ReadingFactory()
>>> f.convert(u'Qǐng nǐ děng yīxià!', 'Pinyin', 'MandarinBraille',
...     targetOptions={'toneMarkType': 'None'})
u'\u2805\u2821 \u281d\u280a \u2819\u283c \u280a\u2813\u282b\u2830\u2802'

See also

How is Chinese written in Braille?
Rules
Chinese Braille
Article on Wikipedia

Class