Enum Phonetic
- All Implemented Interfaces:
LanguageForm, Serializable, Comparable<Phonetic>, Constable
Many languages require different word forms based on the sound that follows. For example, English uses "a" before consonant sounds and "an" before vowel sounds. Italian has more complex rules requiring different articles before vowels, s+consonant clusters, and certain other onsets.
The phonetic category of a word is determined at runtime by a user-supplied resolver function, since correct classification often requires language-specific knowledge and exception handling.
- Since:
- 1.2.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWord begins with a typical consonant sound.Word begins with W functioning as a consonantal glide /w/.Word begins with Y functioning as a consonantal glide /j/.Word begins with the palatal nasal cluster GN.Word begins with an aspirated (pronounced) H.Word begins with a silent H, making it phonetically vowel-initial.Arabic moon letter (الحروف القمرية).Fallback category for edge cases not covered by other values.Word begins with the PN cluster.Word begins with the PS cluster.Word begins with s + consonant cluster (s impura).Arabic sun letter (الحروف الشمسية).Word begins with a stressed A or HA sound.Word begins with a vowel sound.Word begins with X (/ks/ sound).Word begins with Z sound or affricates /ts/, /dz/. -
Method Summary
Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
VOWEL
Word begins with a vowel sound.Applies to most languages. In English, triggers "an" instead of "a". In French, triggers elision (le/la → l'). In Italian, triggers l' for singular articles.
Note: Classification is by sound, not spelling. English "hour" is phonetically vowel-initial; "university" is not.
-
CONSONANT
-
H_SILENT
-
H_ASPIRATED
Word begins with an aspirated (pronounced) H.Primarily applies to English and French.
English examples: "house", "happy" → "a house"
French examples (h aspiré): "héros", "haricot" → "le héros" (no elision)
-
S_IMPURE
-
Z
-
GN
-
PS
-
PN
-
X
-
GLIDE_Y
-
GLIDE_W
-
STRESSED_A
Word begins with a stressed A or HA sound.Primarily applies to Spanish and Catalan. Feminine nouns with stressed initial A take masculine singular articles for euphonic reasons, while remaining grammatically feminine.
Examples: "agua", "águila", "hacha", "alma" → "el agua" (not "la agua"), but "las aguas" in plural
Note: The noun remains feminine—adjectives still agree femininely: "el agua fría" (the cold water).
-
SOLAR
-
LUNAR
-
OTHER
-
-
Method Details
-
values
-
valueOf
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 nameNullPointerException- if the argument is null
-