b4msa.lang_dependency

class b4msa.lang_dependency.LangDependency(lang='spanish')[source]

Defines a set of functions to change text using laguage dependent transformations, e.g., - Negation - Stemming - Stopwords

Parameters

lang (str) – Language spanish | english | italian | german

english_negation(text)[source]

Standarizes negation sentences markers used: “not, no, never, nor, neither” “any” is only used with negative sentences.

load_stopwords(fileName)[source]

Load stopwords from file

property neg_stopwords

Stop words skip to find a negation

negation(text)[source]

Applies negation process to the given text

spanish_negation(text)[source]

Standarizes negation sentences, nouns are also considering with the operator “sin” (without) Markers like ninguno, ningún, nadie are considered as another word.

stemming(text)[source]

Applies the stemming process to text parameter

property stopwords

Stop words read from resources directory

exception b4msa.lang_dependency.LangDependencyError(message)[source]
b4msa.lang_dependency.get_lang(l)[source]

Convert language abbr to full names