fixed missing return
This commit is contained in:
parent
b8bd92db06
commit
480c1e8928
@ -136,6 +136,7 @@ def lemm(s):
|
||||
word_lemmatized = lemmatizer.lemmatize(word[0], pos=wordnet_pos)
|
||||
lemmatized_sent.append(word_lemmatized)
|
||||
lemmatized_sent = (" ").join(lemmatized_sent)
|
||||
return lemmatized_sent
|
||||
|
||||
|
||||
def batch_stem(sentences):
|
||||
@ -575,9 +576,9 @@ class pipeline_manager(object):
|
||||
def predict(self,X, use_stemming=True, use_lemmatization=True):
|
||||
"""predict"""
|
||||
if use_stemming:
|
||||
X = batch_stem(X)
|
||||
X = np.array(batch_stem(X))
|
||||
if use_lemmatization:
|
||||
X = batch_lemm(X)
|
||||
X = np.array(batch_lemm(X))
|
||||
return self.pipeline.predict(X)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user