Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions summa/preprocessing/snowball.py
Original file line number Diff line number Diff line change
Expand Up @@ -2969,8 +2969,11 @@ def stem(self, word):
chr_exceeded = True
break

if chr_exceeded:
word = self.__cyrillic_to_roman(word)
# If there are no Cyrillic chars -> return as is
if not chr_exceeded:
return word

word = self.__cyrillic_to_roman(word)

step1_success = False
adjectival_removed = False
Expand Down Expand Up @@ -3115,8 +3118,7 @@ def stem(self, word):
if word.endswith("'"):
word = word[:-1]

if chr_exceeded:
word = self.__roman_to_cyrillic(word)
word = self.__roman_to_cyrillic(word)


return word
Expand Down