Exemple #1
0
def preprocess(sentence):  # preprocess the sentence using preprocessing model
    clean = prep.cleanPunctuationAndLower(sentence)
    lemma = prep.Lemmatization(clean)
    spell = prep.cleanSW(lemma)
    return spell
Exemple #2
0
 def test_cleanPunctuationAndLower(self):
     self.assertEqual(prep.cleanPunctuationAndLower("HI!@##@$#%?HI"),"hihi")
def preprocess(sentence): # preprocess the sentence using preprocessing model
    clean=prep.cleanPunctuationAndLower(sentence)
    stemm=prep.StemmingAndLemmatization(clean)
    spell=prep.cleanStopWordsAndSpelling(stemm)
    return spell