Enum DictionaryAttribute

java.lang.Object
java.lang.Enum<DictionaryAttribute>
morfologik.stemming.DictionaryAttribute
All Implemented Interfaces:
Serializable, Comparable<DictionaryAttribute>

public enum DictionaryAttribute extends Enum<DictionaryAttribute>
Attributes applying to Dictionary and DictionaryMetadata.
  • Enum Constant Details

    • SEPARATOR

      public static final DictionaryAttribute SEPARATOR
      Logical fields separator inside the FSA.
    • ENCODING

      public static final DictionaryAttribute ENCODING
      Character to byte encoding used for strings inside the FSA.
    • FREQUENCY_INCLUDED

      public static final DictionaryAttribute FREQUENCY_INCLUDED
      If the FSA dictionary includes frequency data.
    • IGNORE_NUMBERS

      public static final DictionaryAttribute IGNORE_NUMBERS
      If the spelling dictionary is supposed to ignore words containing digits
    • IGNORE_PUNCTUATION

      public static final DictionaryAttribute IGNORE_PUNCTUATION
      If the spelling dictionary is supposed to ignore punctuation.
    • IGNORE_CAMEL_CASE

      public static final DictionaryAttribute IGNORE_CAMEL_CASE
      If the spelling dictionary is supposed to ignore CamelCase words.
    • IGNORE_ALL_UPPERCASE

      public static final DictionaryAttribute IGNORE_ALL_UPPERCASE
      If the spelling dictionary is supposed to ignore ALL UPPERCASE words.
    • IGNORE_DIACRITICS

      public static final DictionaryAttribute IGNORE_DIACRITICS
      If the spelling dictionary is supposed to ignore diacritics, so that 'a' would be treated as equivalent to 'ą'.
    • CONVERT_CASE

      public static final DictionaryAttribute CONVERT_CASE
      if the spelling dictionary is supposed to treat upper and lower case as equivalent.
    • RUN_ON_WORDS

      public static final DictionaryAttribute RUN_ON_WORDS
      If the spelling dictionary is supposed to split runOnWords.
    • LOCALE

      public static final DictionaryAttribute LOCALE
      Locale associated with the dictionary.
    • ENCODER

      public static final DictionaryAttribute ENCODER
      Locale associated with the dictionary.
    • INPUT_CONVERSION

      public static final DictionaryAttribute INPUT_CONVERSION
      Input conversion pairs to replace non-standard characters before search in a speller dictionary. For example, common ligatures can be replaced here.
    • OUTPUT_CONVERSION

      public static final DictionaryAttribute OUTPUT_CONVERSION
      Output conversion pairs to replace non-standard characters before search in a speller dictionary. For example, standard characters can be replaced here into ligatures. Useful for dictionaries that do have certain standards imposed.
    • REPLACEMENT_PAIRS

      public static final DictionaryAttribute REPLACEMENT_PAIRS
      Replacement pairs for non-obvious candidate search in a speller dictionary. For example, Polish rz is phonetically equivalent to ż, and this may be specified here to allow looking for replacements of rz with ż and vice versa.
    • EQUIVALENT_CHARS

      public static final DictionaryAttribute EQUIVALENT_CHARS
      Equivalent characters (treated similarly as equivalent chars with and without diacritics). For example, Polish ł can be specified as equivalent to l.

      This implements a feature similar to hunspell MAP in the affix file.

    • LICENSE

      public static final DictionaryAttribute LICENSE
      Dictionary license attribute.
    • AUTHOR

      public static final DictionaryAttribute AUTHOR
      Dictionary author.
    • CREATION_DATE

      public static final DictionaryAttribute CREATION_DATE
      Dictionary creation date.
  • Field Details

    • propertyName

      public final String propertyName
      Property name for this attribute.
    • attrsByPropertyName

      private static final Map<String,DictionaryAttribute> attrsByPropertyName
  • Constructor Details

    • DictionaryAttribute

      private DictionaryAttribute(String propertyName)
      Private enum instance constructor.
  • Method Details

    • values

      public static DictionaryAttribute[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DictionaryAttribute valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public Object fromString(String value) throws IllegalArgumentException
      Converts a string to the given attribute's value.
      Parameters:
      value - The value to convert to an attribute value.
      Returns:
      Returns the attribute's value converted from a string.
      Throws:
      IllegalArgumentException - If the input string cannot be converted to the attribute's value.
    • fromPropertyName

      public static DictionaryAttribute fromPropertyName(String propertyName)
      Parameters:
      propertyName - The property of a DictionaryAttribute.
      Returns:
      Return a DictionaryAttribute associated with a given propertyName.
    • booleanValue

      private static Boolean booleanValue(String value)