コード例 #1
0
 def test_stemmingAndLemma(self):
     self.assertEqual(prep.StemmingAndLemmatization("the children are playing"),"the child are play")
コード例 #2
0
def preprocess(sentence): # preprocess the sentence using preprocessing model
    clean=prep.cleanPunctuationAndLower(sentence)
    stemm=prep.StemmingAndLemmatization(clean)
    spell=prep.cleanStopWordsAndSpelling(stemm)
    return spell