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

Class CharacterResidualStrokeCountBuilder

source code


Builds a mapping between characters and their residual stroke count when splitting of the radical form. This is stripped off information gathered from table CharacterRadicalStrokeCount.

Nested Classes [hide private]
  ResidualStrokeCountExtractor
Generates the character to residual stroke count mapping from the CharacterRadicalResidualStrokeCount table.
Instance Methods [hide private]
 
__init__(self, dataPath, dbConnectInst, quiet=False)
Constructs the TableBuilder.
source code
 
getGenerator(self)
Returns the entry generator.
source code

Inherited from EntryGeneratorBuilder: build, getEntryDict, remove

Inherited from TableBuilder: buildIndexObjects, buildTableObject, findFile

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

Class Variables [hide private]
  PROVIDES = 'CharacterResidualStrokeCount'
Contains the name of the table provided by this module.
  DEPENDS = ['CharacterRadicalResidualStrokeCount']
Contains the names of the tables needed for the build process.
  COLUMNS = ['ChineseCharacter', 'ZVariant', 'RadicalIndex', 'Re...
Columns that will be built
  PRIMARY_KEYS = ['ChineseCharacter', 'ZVariant', 'RadicalIndex']
Primary keys of the created table
  INDEX_KEYS = [['RadicalIndex']]
Index keys (not unique) of the created table
  COLUMN_TYPES = {'ChineseCharacter': String(length=1, convert_u...
Column types for created table
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dataPath, dbConnectInst, quiet=False)
(Constructor)

source code 

Constructs the TableBuilder.

Parameters:
  • dataPath - optional list of paths to the data file(s)
  • dbConnectInst - instance of a DatabaseConnector. If not given all sql code will be printed to stdout.
  • quiet - if true no status information will be printed to stderr
Overrides: object.__init__
(inherited documentation)

getGenerator(self)

source code 

Returns the entry generator. Needs to be implemented by child classes.

Overrides: EntryGeneratorBuilder.getGenerator
(inherited documentation)

Class Variable Details [hide private]

COLUMNS

Columns that will be built

Value:
['ChineseCharacter',
 'ZVariant',
 'RadicalIndex',
 'ResidualStrokeCount']

COLUMN_TYPES

Column types for created table

Value:
{'ChineseCharacter': String(length=1, convert_unicode=False, assert_un\
icode=None),
 'RadicalIndex': Integer(),
 'ResidualStrokeCount': Integer(),
 'ZVariant': Integer()}