Home | Trees | Indices | Help |
|
---|
|
Defines an abstract operator on text written in a character reading.
The two basic methods are decompose() and compose(). decompose() breaks down a text into the basic entities of that reading (additional non reading substrings are accepted though). compose() joins these entities together again and applies formating rules needed by the reading. Additionally the method isReadingEntity() is provided to check which of the strings returned by decompose() are supported entities for the given reading.
The methods getDefaultOptions() and getOption() provide means to handle the reading dialect's specific settings.
The class itself can't be used directly, it has to be subclassed and its methods need to be extended.
|
|||
|
|||
|
|||
list of str |
|
||
str |
|
||
bool |
|
||
Inherited from |
|
|||
dict |
|
|
|||
READING_NAME = None Unique name of reading |
|
|||
Inherited from |
|
Creates an instance of the ReadingOperator.
|
Returns the reading operator's default options. The default implementation returns an empty dictionary. The keyword 'dbConnectInst' is not regarded a configuration option of the operator and is thus not included in the dict returned.
|
Returns the value of the reading operator's option.
|
Decomposes the given string into basic entities that can be mapped to one Chinese character each (exceptions possible). The given input string can contain other non reading characters, e.g. punctuation marks. The returned list contains a mix of basic reading entities and other characters e.g. spaces and punctuation marks. The default implementation will raise a NotImplementedError.
|
Composes the given list of basic entities to a string. The default implementation will raise a NotImplementedError.
|
Returns true if the given entity is recognised by the reading operator, i.e. it is a valid entity of the reading returned by decompose(). The default implementation will raise a NotImplementedError.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 19 22:38:39 2009 | http://epydoc.sourceforge.net |