Package org.egothor.stemmer
Enum Class StemmerPatchTrieLoader.Language
- All Implemented Interfaces:
Serializable,Comparable<StemmerPatchTrieLoader.Language>,Constable
- Enclosing class:
StemmerPatchTrieLoader
Supported bundled stemmer dictionaries.
Each language constant defines:
- the resource directory name used under the bundled resources tree
- whether the language is written right-to-left
The right-to-left flag is intended for consumers that need to decide whether affix-oriented processing should conceptually traverse words from the visual end or from the logical beginning of the stored form.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCzech.Danish.German.Spanish.Persian.Finnish.French.Hebrew.Hungarian.Italian.Norwegian Bokmål.Dutch.Norwegian Nynorsk.Polish.Portuguese.Russian.Swedish.Ukrainian.English.Yiddish. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the language is written right-to-left.Returns the resource directory name.Returns the classpath resource path of the bundled stemmer dictionary.Returns the enum constant of this class with the specified name.static StemmerPatchTrieLoader.Language[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CS_CZ
Czech. -
DA_DK
Danish. -
DE_DE
German. -
ES_ES
Spanish. -
FA_IR
Persian. -
FI_FI
Finnish. -
FR_FR
French. -
HE_IL
Hebrew. -
HU_HU
Hungarian. -
IT_IT
Italian. -
NB_NO
Norwegian Bokmål. -
NL_NL
Dutch. -
NN_NO
Norwegian Nynorsk. -
PL_PL
Polish. -
PT_PT
Portuguese. -
RU_RU
Russian. -
SV_SE
Swedish. -
UK_UA
Ukrainian. -
US_UK
English. -
YI
Yiddish.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
resourcePath
Returns the classpath resource path of the bundled stemmer dictionary.- Returns:
- classpath resource path
-
resourceDirectory
Returns the resource directory name.- Returns:
- resource directory name
-
isRightToLeft
public boolean isRightToLeft()Returns whether the language is written right-to-left.This flag can be used by trie-building and lookup logic to decide whether suffix-oriented traversal should operate on the stored word form as-is rather than by reversing the logical character sequence.
- Returns:
truewhen the language is written right-to-left, otherwisefalse
-