mindmeld.text_preparation.stemmers module

class mindmeld.text_preparation.stemmers.EnglishNLTKStemmer[source]

Bases: mindmeld.text_preparation.stemmers.Stemmer

stem_word(word)[source]

Gets the stem of a word. For example, the stem of the word 'fishing' is 'fish'.

Parameters:word (str) -- The word to stem
Returns:A stemmed version of the word
Return type:stemmed_word (str)
class mindmeld.text_preparation.stemmers.NoOpStemmer[source]

Bases: mindmeld.text_preparation.stemmers.Stemmer

stem_word(word)[source]

Gets the stem of a word. For example, the stem of the word 'fishing' is 'fish'.

Parameters:word (str) -- The word to stem
Returns:A stemmed version of the word
Return type:stemmed_word (str)
class mindmeld.text_preparation.stemmers.SnowballNLTKStemmer(language=None)[source]

Bases: mindmeld.text_preparation.stemmers.Stemmer

stem_word(word)[source]

Gets the stem of a word. For example, the stem of the word 'fishing' is 'fish'.

Parameters:word (str) -- The word to stem
Returns:A stemmed version of the word
Return type:stemmed_word (str)
class mindmeld.text_preparation.stemmers.Stemmer[source]

Bases: abc.ABC

stem_word(word)[source]

Gets the stem of a word. For example, the stem of the word 'fishing' is 'fish'.

Parameters:word (str) -- The word to stem
Returns:A stemmed version of the word
Return type:stemmed_word (str)
tojson()[source]

Method defined to obtain recursive JSON representation of a TextPreparationPipeline.

Parameters:None. --
Returns:JSON representation of TextPreparationPipeline (dict) .
class mindmeld.text_preparation.stemmers.StemmerFactory[source]

Bases: object

Stemmer Factory Class

static get_language_from_language_code(language_code)[source]
static get_stemmer(stemmer: str)[source]

A static method to get a stemmer.

Parameters:stemmer (str) -- Name of the desired translator class
Returns:Stemmer Class
Return type:(Stemmer)
static get_stemmer_by_language(language_code)[source]