mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fixup! Only stem words once
This commit is contained in:
parent
607ea49c92
commit
5f03152f76
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user