Package morfologik.stemming
Enum DictionaryAttribute
- java.lang.Object
-
- java.lang.Enum<DictionaryAttribute>
-
- morfologik.stemming.DictionaryAttribute
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DictionaryAttribute>
public enum DictionaryAttribute extends java.lang.Enum<DictionaryAttribute>
Attributes applying toDictionary
andDictionaryMetadata
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHOR
Dictionary author.CONVERT_CASE
if the spelling dictionary is supposed to treat upper and lower case as equivalent.CREATION_DATE
Dictionary creation date.ENCODER
Locale associated with the dictionary.ENCODING
Character to byte encoding used for strings inside the FSA.EQUIVALENT_CHARS
Equivalent characters (treated similarly as equivalent chars with and without diacritics).FREQUENCY_INCLUDED
If the FSA dictionary includes frequency data.IGNORE_ALL_UPPERCASE
If the spelling dictionary is supposed to ignore ALL UPPERCASE words.IGNORE_CAMEL_CASE
If the spelling dictionary is supposed to ignore CamelCase words.IGNORE_DIACRITICS
If the spelling dictionary is supposed to ignore diacritics, so that 'a' would be treated as equivalent to 'ą'.IGNORE_NUMBERS
If the spelling dictionary is supposed to ignore words containing digitsIGNORE_PUNCTUATION
If the spelling dictionary is supposed to ignore punctuation.INPUT_CONVERSION
Input conversion pairs to replace non-standard characters before search in a speller dictionary.LICENSE
Dictionary license attribute.LOCALE
Locale associated with the dictionary.OUTPUT_CONVERSION
Output conversion pairs to replace non-standard characters before search in a speller dictionary.REPLACEMENT_PAIRS
Replacement pairs for non-obvious candidate search in a speller dictionary.RUN_ON_WORDS
If the spelling dictionary is supposed to split runOnWords.SEPARATOR
Logical fields separator inside the FSA.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,DictionaryAttribute>
attrsByPropertyName
java.lang.String
propertyName
Property name for this attribute.
-
Constructor Summary
Constructors Modifier Constructor Description private
DictionaryAttribute(java.lang.String propertyName)
Private enum instance constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Boolean
booleanValue(java.lang.String value)
static DictionaryAttribute
fromPropertyName(java.lang.String propertyName)
java.lang.Object
fromString(java.lang.String value)
Converts a string to the given attribute's value.static DictionaryAttribute
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DictionaryAttribute[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
propertyName
public final java.lang.String propertyName
Property name for this attribute.
-
attrsByPropertyName
private static final java.util.Map<java.lang.String,DictionaryAttribute> attrsByPropertyName
-
-
Method Detail
-
values
public static DictionaryAttribute[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DictionaryAttribute c : DictionaryAttribute.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DictionaryAttribute valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromString
public java.lang.Object fromString(java.lang.String value) throws java.lang.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:
java.lang.IllegalArgumentException
- If the input string cannot be converted to the attribute's value.
-
fromPropertyName
public static DictionaryAttribute fromPropertyName(java.lang.String propertyName)
- Parameters:
propertyName
- The property of aDictionaryAttribute
.- Returns:
- Return a
DictionaryAttribute
associated with a givenpropertyName
.
-
booleanValue
private static java.lang.Boolean booleanValue(java.lang.String value)
-
-