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

Class km

source code

   object --+    
            |    
common.Common --+
                |
               km

This class represents Khmer.

Instance Methods [hide private]

Inherited from common.Common: __init__, __repr__

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

Class Methods [hide private]

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

Class Variables [hide private]
  code = 'km'
The ISO 639 language code, possibly with a country specifier or other modifier.
  fullname = 'Khmer'
The full (English) name of this language.
  nplurals = 1
The number of plural forms of this language.
  pluralequation = "0"
The plural equation for selection of plural forms.
  khmerpunc = u'។៕៖៘'
These marks are only used for Khmer.
  punctuation = u'.,;:!?-@#$%^*_()[]{}/\'`"<>‘’‛“”„‟′″‴‵‶‷‹›«»…±...
We include many types of punctuation here, simply since this is only meant to determine if something is punctuation.
  sentenceend = u'!?…។៕៘'
These marks can indicate a sentence end.
  sentencere = re.compile(r'(?sx).*?[!\?\u2026\u17d4\u17d5\u17d8...
  puncdict = {u'!': u' !', u'.': u' ។', u':': u' ៖', u'?': u' ?'}
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, commonpunc, ethiopicpunc, indicpunc, invertedpunc, listseperator, miscpunc, quotes, rtlpunc

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

punctuation

We include many types of punctuation here, simply since this is only meant to determine if something is punctuation. Hopefully we catch some languages which might not be represented with modules. Most languages won't need to override this.

Value:
u'.,;:!?-@#$%^*_()[]{}/\'`"<>‘’‛“”„‟′″‴‵‶‷‹›«»…±°¹²³·©®×£¥€។៕៖៘'

sentencere

Value:
re.compile(r'(?sx).*?[!\?\u2026\u17d4\u17d5\u17d8]\s+(?=[^a-z\d])')