Skip to content

Commit

Permalink
Fix 'learning empty word' bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioburdisso committed Feb 27, 2020
1 parent 52fbf45 commit 0d3d7e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyss3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ def learn(self, doc, cat, n_grams=1, prep=True, update=True):
Print.info("learning...", offset=1)
tips = []
for word in doc:
if word != ".":
if word and word != '.':
self.__prun_counter__ += 1
# if word doesn't exist yet, then...
try:
Expand Down

0 comments on commit 0d3d7e1

Please sign in to comment.