mirror of https://github.com/apache/lucene.git
Exclude words ending in -ion from Swedish minimal and light stemmers.
This commit is contained in:
parent
1fa2be90ea
commit
bfd822dde3
|
@ -87,6 +87,9 @@ class SwedishLightStemmer {
|
|||
|| endsWith(s, len, "te")
|
||||
|| endsWith(s, len, "et"))) return len - 2;
|
||||
|
||||
if (len > 5 && endsWith(s, len, "ion"))
|
||||
return len;
|
||||
|
||||
if (len > 3)
|
||||
switch (s[len - 1]) {
|
||||
case 't':
|
||||
|
|
|
@ -82,6 +82,9 @@ class SwedishMinimalStemmer {
|
|||
|| endsWith(s, len, "or")
|
||||
|| endsWith(s, len, "en"))) return len - 2;
|
||||
|
||||
if (len > 5 && endsWith(s, len, "ion"))
|
||||
return len;
|
||||
|
||||
if (len > 3)
|
||||
switch (s[len - 1]) {
|
||||
case 'a':
|
||||
|
|
|
@ -81,3 +81,6 @@ tomter tomt
|
|||
tomtar tomt
|
||||
änderna änd
|
||||
ändar änd
|
||||
reaktion reaktion
|
||||
kommunikation kommunikation
|
||||
inflation inflation
|
Binary file not shown.
Loading…
Reference in New Issue