Package translate :: Package lang :: Module zh :: Class zh
[hide private]
[frames] | no frames]

Class zh

source code


This class represents Chinese.

Instance Methods [hide private]
 
length_difference(cls, x)
Returns an estimate to a likely change in length relative to an English string of length len.
source code

Inherited from common.Common: __deepcopy__, __repr__, alter_length

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

Class Methods [hide private]

Inherited from common.Common: capsstart, character_iter, characters, punctranslate, sentence_iter, sentences, word_iter, words

Static Methods [hide private]

Inherited from common.Common: __new__

Class Variables [hide private]
  listseperator = u''
This string is used to seperate lists of textual elements.
  sentenceend = u'。!?…'
These marks can indicate a sentence end.
  sentencere = re.compile(r'(?sx).*?[\u3002\uff01\uff1f\u2026]\s*')
  puncdict = {...
A dictionary of punctuation transformation rules that can be used by punctranslate().
  ignoretests = ['startcaps', 'simplecaps']
List of pofilter tests for this language that must be ignored.

Inherited from common.Common: CJKpunc, checker, code, commonpunc, ethiopicpunc, fullname, indicpunc, invertedpunc, miscpunc, nplurals, pluralequation, punctuation, quotes, rtlpunc, validaccel, validdoublewords

Inherited from common.Common (private): _languages

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

length_difference(cls, x)

source code 

Returns an estimate to a likely change in length relative to an English string of length len.

Overrides: common.Common.length_difference
(inherited documentation)

Class Variable Details [hide private]

puncdict

A dictionary of punctuation transformation rules that can be used by punctranslate().

Value:
{u'''!
''': u'''
''',
 u'! ': u'',
 u'% ': u'%',
 u'''.
''': u'''
''',
...