Enum Class DiacriticProcessingMode

java.lang.Object
java.lang.Enum<DiacriticProcessingMode>
org.egothor.stemmer.DiacriticProcessingMode
All Implemented Interfaces:
Serializable, Comparable<DiacriticProcessingMode>, Constable

public enum DiacriticProcessingMode extends Enum<DiacriticProcessingMode>
Defines how dictionary loading and trie traversal should treat diacritics.

The selected mode is applied independently from other normalization modes (for example CaseProcessingMode). This means case normalization and diacritic normalization can be combined freely and each keeps its own semantics.

  • Enum Constant Details

    • AS_IS

      public static final DiacriticProcessingMode AS_IS
      Preserves dictionary entries and lookup keys exactly as provided.
    • REMOVE

      public static final DiacriticProcessingMode REMOVE
      Removes diacritics from dictionary entries before trie construction and removes diacritics from lookup keys before traversal.
    • AS_IS_AND_STRIPPED_FALLBACK

      public static final DiacriticProcessingMode AS_IS_AND_STRIPPED_FALLBACK
      Planned dual-path mode where lookup may continue along both the original diacritic edge and a normalized non-diacritic alternative.

      This mode is currently not supported and using it triggers UnsupportedOperationException.

  • Method Details

    • values

      public static DiacriticProcessingMode[] 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

      public static DiacriticProcessingMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null