mirror of https://github.com/apache/lucene.git
[hunspell] perform a bit fewer checks after 2 suffixes have been removed
This commit is contained in:
parent
3210a42f09
commit
419ffd3974
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue