Beispiel #1
0
def wordInDocFrequency(databaseName, word, docID):
	wordscount = documentInfo(databaseName, docID)['words']
	return getIndex(databaseName).term_frequency(createStem(word, 'cs'), int(docID), wordscount)
Beispiel #2
0
def documentFrequency(databaseName, word):
	return getIndex(databaseName).document_frequency(createStem(word, 'cs'))
Beispiel #3
0
def getWordCountInDoc(databaseName, word, docID):
	return getIndex(databaseName).getTermCountInDoc(createStem(word, 'cs'), int(docID))
Beispiel #4
0
def wordFrequency(databaseName, word):
	return getIndex(databaseName).totalTermFrequency(createStem(word, 'cs'))
Beispiel #5
0
def getstem(word, lang):
    word = normalize_text(word)
    stem = createStem(word, lang)
    stem = strip_accents(stem)
    return stem
Beispiel #6
0
def tostems(words, lang):
    return map(lambda x: createStem(x, lang, save=True), words)
Beispiel #7
0
def getstem(word, lang):
	word = normalize_text(word)
	stem = createStem(word, lang)
	stem = strip_accents(stem)
	return stem
Beispiel #8
0
def tostems(words, lang):
	return map(lambda x: createStem(x, lang, save=True), words)