Skip to content

Commit

Permalink
Fix the empty stem bug in the greek stemmer
Browse files Browse the repository at this point in the history
  • Loading branch information
NC0DER authored and miso-belica committed Jun 13, 2022
1 parent ee74692 commit a7553dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sumy/nlp/stemmers/greek.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def stem_word(word):
for tag in _TOTAL_TAGS:
try:
stemmed = gr_stemmer.stem_word(word.lower(), tag)
if stemmed[-1].upper() in _CONSONANTS:
if stemmed and stemmed[-1].upper() in _CONSONANTS:
stem_candidates.add(stemmed)
except (TypeError, ValueError):
pass
Expand Down

0 comments on commit a7553dd

Please sign in to comment.