Package org.egothor.stemmer
Enum Class ReductionMode
- All Implemented Interfaces:
Serializable,Comparable<ReductionMode>,Constable
Defines the subtree reduction strategy applied during trie compilation.
All reduction modes operate on the full subtree semantics, not only on the local content of a single node. This is important because trie values may be stored on both internal nodes and leaf nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMerges subtrees whose preferredget()results are equivalent for every reachable key suffix, provided that the locally dominant winner satisfies the configured dominance constraints.Merges subtrees whosegetAll()results are equivalent for every reachable key suffix and whose local result ordering is the same.Merges subtrees whosegetAll()results are equivalent for every reachable key suffix, regardless of the local ordering of values. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReductionModeReturns the enum constant of this class with the specified name.static ReductionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS
Merges subtrees whosegetAll()results are equivalent for every reachable key suffix and whose local result ordering is the same.This mode ignores absolute frequencies when comparing subtree signatures, but preserves the value order returned by
getAll(). -
MERGE_SUBTREES_WITH_EQUIVALENT_UNORDERED_GET_ALL_RESULTS
Merges subtrees whosegetAll()results are equivalent for every reachable key suffix, regardless of the local ordering of values.This mode ignores both absolute frequencies and local result ordering when comparing subtree signatures.
-
MERGE_SUBTREES_WITH_EQUIVALENT_DOMINANT_GET_RESULTS
Merges subtrees whose preferredget()results are equivalent for every reachable key suffix, provided that the locally dominant winner satisfies the configured dominance constraints.If a node does not satisfy the dominance constraints, the implementation falls back to ranked
getAll()semantics for that node in order to avoid unsafe over-reduction.
-
-
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
-