fixup! Only stem words once

This commit is contained in:
Adam Turner 2024-10-10 10:28:48 +01:00
parent 607ea49c92
commit 5f03152f76

View File

@ -255,10 +255,8 @@ class SearchChinese(SearchLanguage):
# avoids some issues with acronyms
stemmed = self.stemmer.stemWord(word.lower())
should_not_be_stemmed = (
word in self.latin_terms
and len(word) >= 3
and len(stemmed) < 3
)
word in self.latin_terms and len(word) >= 3 > len(stemmed)
) # fmt: skip
if should_not_be_stemmed:
return word.lower()
return stemmed