[hunspell] perform a bit fewer checks after 2 suffixes have been removed

This commit is contained in:
Peter Gromov 2022-10-31 10:08:32 +01:00
parent 3210a42f09
commit 419ffd3974
1 changed files with 2 additions and 0 deletions

View File

@ -614,6 +614,8 @@ final class Stemmer {
return false; return false;
} }
if (innerSuffix >= 0) return true;
int recursionDepth = int recursionDepth =
(outerSuffix >= 0 ? 1 : 0) + (innerPrefix >= 0 ? 2 : outerPrefix >= 0 ? 1 : 0) - 1; (outerSuffix >= 0 ? 1 : 0) + (innerPrefix >= 0 ? 2 : outerPrefix >= 0 ? 1 : 0) - 1;
if (dictionary.isCrossProduct(affix) && recursionDepth <= 1) { if (dictionary.isCrossProduct(affix) && recursionDepth <= 1) {