def preprocess(sentence): # preprocess the sentence using preprocessing model clean = prep.cleanPunctuationAndLower(sentence) lemma = prep.Lemmatization(clean) spell = prep.cleanSW(lemma) return spell
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