Skip to content

Commit 9ce9b58

Browse files
committed
don't lemmatize word to empty string
1 parent e612652 commit 9ce9b58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hazm/Lemmatizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def lemmatize(self, word, pos=''):
4949
return word
5050

5151
stem = self.stemmer.stem(word)
52-
if stem in self.words:
52+
if stem and stem in self.words:
5353
return stem
5454

5555
return word

0 commit comments

Comments
 (0)