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, "te")
|
||||||
|| endsWith(s, len, "et"))) return len - 2;
|
|| endsWith(s, len, "et"))) return len - 2;
|
||||||
|
|
||||||
|
if (len > 5 && endsWith(s, len, "ion"))
|
||||||
|
return len;
|
||||||
|
|
||||||
if (len > 3)
|
if (len > 3)
|
||||||
switch (s[len - 1]) {
|
switch (s[len - 1]) {
|
||||||
case 't':
|
case 't':
|
||||||
|
|
|
@ -82,6 +82,9 @@ class SwedishMinimalStemmer {
|
||||||
|| endsWith(s, len, "or")
|
|| endsWith(s, len, "or")
|
||||||
|| endsWith(s, len, "en"))) return len - 2;
|
|| endsWith(s, len, "en"))) return len - 2;
|
||||||
|
|
||||||
|
if (len > 5 && endsWith(s, len, "ion"))
|
||||||
|
return len;
|
||||||
|
|
||||||
if (len > 3)
|
if (len > 3)
|
||||||
switch (s[len - 1]) {
|
switch (s[len - 1]) {
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
|
@ -80,4 +80,7 @@ timmar timm
|
||||||
tomter tomt
|
tomter tomt
|
||||||
tomtar tomt
|
tomtar tomt
|
||||||
änderna änd
|
änderna änd
|
||||||
ändar änd
|
ändar änd
|
||||||
|
reaktion reaktion
|
||||||
|
kommunikation kommunikation
|
||||||
|
inflation inflation
|
Binary file not shown.
Loading…
Reference in New Issue