Exemplo n.º 1
0
def normalize_text(text):
	functions = [lambda x: remove_nonletters(x, ' '), lambda x: replace_white_spaces(x, ' '), lambda x: x.lower().strip()]
	return sreduce(functions, text)
Exemplo n.º 2
0
def getWordsWithoutStopWords(text, stopwords):
    funs = [towords, lambda x: remstopwords(x, stopwords)]
    return list(sreduce(funs, text))
Exemplo n.º 3
0
def stemAndRemoveAccents(words, lang):
    funs = [lambda x: tostems(x, lang), glmap(strip_accents)]
    return sreduce(funs, words)
Exemplo n.º 4
0
def getRealWords(text, stopwords):
    funs = [
        towords, lambda x: remstopwords(x, stopwords),
        glmap(strip_accents)
    ]
    return sreduce(funs, text)
Exemplo n.º 5
0
def stemAndRemoveAccents(words, lang):
	funs = [lambda x:tostems(x, lang), glmap(strip_accents)]
	return sreduce(funs, words)
Exemplo n.º 6
0
def getWordsWithoutStopWords(text, stopwords):
	funs = [towords, lambda x: remstopwords(x, stopwords)]
	return list(sreduce(funs, text))
Exemplo n.º 7
0
def getRealWords(text, stopwords):
	funs = [towords, lambda x: remstopwords(x, stopwords), glmap(strip_accents)]
	return sreduce(funs, text)
Exemplo n.º 8
0
def normalize_text(text):
    functions = [
        lambda x: remove_nonletters(x, ' '),
        lambda x: replace_white_spaces(x, ' '), lambda x: x.lower().strip()
    ]
    return sreduce(functions, text)