public class LatvianStemmer
extends java.lang.Object
This is a light version of the algorithm in Karlis Kreslin's PhD thesis A stemming algorithm for Latvian with the following modifications:
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LatvianStemmer.Affix |
Modifier and Type | Field and Description |
---|---|
(package private) static LatvianStemmer.Affix[] |
affixes |
Constructor and Description |
---|
LatvianStemmer() |
Modifier and Type | Method and Description |
---|---|
private int |
numVowels(char[] s,
int len)
Count the vowels in the string, we always require at least
one in the remaining stem to accept it.
|
int |
stem(char[] s,
int len)
Stem a latvian word.
|
private int |
unpalatalize(char[] s,
int len)
Most cases are handled except for the ambiguous ones:
s -> š
t -> š
d -> ž
z -> ž
|
static final LatvianStemmer.Affix[] affixes
public int stem(char[] s, int len)
private int unpalatalize(char[] s, int len)
private int numVowels(char[] s, int len)