class documentation

class SearchChinese(SearchLanguage):

View In Hierarchy

Chinese search implementation
Method init Initialize the class with the options the user has given.
Method split This method splits a sentence into words. Default splitter splits input at white spaces, which should be enough for most languages except CJK languages.
Method stem This method implements stemming algorithm of the Python version.
Method word​_filter Return true if the target word should be registered in the search index. This method is called after stemming.
Class Variable lang Undocumented
Class Variable language​_name Undocumented
Class Variable latin1​_letters Undocumented
Class Variable latin​_terms Undocumented
Instance Variable stemmer Undocumented

Inherited from SearchLanguage:

Method __init__ Undocumented
Class Variable ​_word​_re Undocumented
Class Variable js​_splitter​_code Undocumented
Class Variable js​_stemmer​_code Undocumented
Class Variable js​_stemmer​_rawcode Undocumented
Class Variable stopwords Undocumented
Instance Variable options Undocumented
def init(self, options):
Initialize the class with the options the user has given.
Parameters
options:DictUndocumented
def split(self, input):
This method splits a sentence into words. Default splitter splits input at white spaces, which should be enough for most languages except CJK languages.
Parameters
input:strUndocumented
Returns
List[str]Undocumented
def stem(self, word):

This method implements stemming algorithm of the Python version.

Default implementation does nothing. You should implement this if the language has any stemming rules.

This class is used to preprocess search words before registering them in the search index. The stemming of the Python version and the JS version (given in the js_stemmer_code attribute) must be compatible.

Parameters
word:strUndocumented
Returns
strUndocumented
def word_filter(self, stemmed_word):
Return true if the target word should be registered in the search index. This method is called after stemming.
Parameters
stemmed​_word:strUndocumented
Returns
boolUndocumented
lang: str =

Undocumented

language_name: str =
latin1_letters =

Undocumented

latin_terms: List[str] =

Undocumented

stemmer =

Undocumented