Package cjklib :: Module build :: Class CharacterXHCReadingBuilder :: Class XHCReadingSplitter
[hide private]
[frames] | no frames]

Class XHCReadingSplitter

source code


Generates the Xiandai Hanyu Cidian Pinyin syllables from the Unihan table.

Instance Methods [hide private]
 
__init__(self, readingEntries, quiet=False)
Initialises the XHCReadingSplitter.
source code
tuple
convertTonemark(self, entity)
Converts the entity with diacritics into an entity with tone mark as appended number.
source code
 
generator(self)
Provides one entry per reading entity and character.
source code
Class Variables [hide private]
  SPLIT_REGEX = re.compile(r'[0-9,\.\*]+:(\S+)')
  TONEMARK_VOWELS = [u'a', u'e', u'i', u'o', u'u', u'ü', u'n', u...
  TONEMARK_MAP = {u'̀': 4, u'́': 2, u'̄': 1, u'̌': 3}
Method Details [hide private]

__init__(self, readingEntries, quiet=False)
(Constructor)

source code 

Initialises the XHCReadingSplitter.

Parameters:
  • readingEntries (list of tuple) - character reading entries from the Unihan database
  • quiet (bool) - if true no status information will be printed
Overrides: CharacterReadingBuilder.SimpleReadingSplitter.__init__

convertTonemark(self, entity)

source code 

Converts the entity with diacritics into an entity with tone mark as appended number.

Parameters:
  • entity (str) - entity with tonal information
Returns: tuple
plain entity without tone mark and entity's tone index (starting with 1)

generator(self)

source code 

Provides one entry per reading entity and character.

Overrides: CharacterReadingBuilder.SimpleReadingSplitter.generator

Class Variable Details [hide private]

TONEMARK_VOWELS

Value:
[u'a', u'e', u'i', u'o', u'u', u'ü', u'n', u'm', u'r', u'ê']