Class Rule.Phoneme
java.lang.Object
org.apache.commons.codec.language.bm.Rule.Phoneme
- All Implemented Interfaces:
Rule.PhonemeExpr
- Enclosing class:
- Rule
A phoneme.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPhoneme
(CharSequence phonemeText, Languages.LanguageSet languages) Constructs a new instance.Phoneme
(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight) Constructs a new instance.Phoneme
(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight, Languages.LanguageSet languages) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionappend
(CharSequence sequence) Appends the sequence to the phone text.Gets the language set.Gets an iteration of phonemes.Gets the phoneme text sequence.join
(Rule.Phoneme right) Deprecated.since 1.9Returns a new Phoneme with the same text but a union of its current language set and the given one.int
size()
Gets the expression size in phonemes.toString()
-
Field Details
-
COMPARATOR
The Phoneme Comparator.
-
-
Constructor Details
-
Phoneme
Constructs a new instance.- Parameters:
phonemeText
- The phoneme text.languages
- A language set.
-
Phoneme
Constructs a new instance.- Parameters:
phonemeLeft
- The left phoneme text.phonemeRight
- The right phoneme text.
-
Phoneme
public Phoneme(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight, Languages.LanguageSet languages) Constructs a new instance.- Parameters:
phonemeLeft
- The left phoneme text.phonemeRight
- The right phoneme text.languages
- A language set.
-
-
Method Details
-
append
Appends the sequence to the phone text.- Parameters:
sequence
- The sequence to append.- Returns:
- this instance.
-
getLanguages
Gets the language set.- Returns:
- the language set.
-
getPhonemes
Description copied from interface:Rule.PhonemeExpr
Gets an iteration of phonemes.- Specified by:
getPhonemes
in interfaceRule.PhonemeExpr
- Returns:
- an iteration of phonemes.
-
getPhonemeText
Gets the phoneme text sequence.- Returns:
- the phoneme text sequence.
-
join
Deprecated.since 1.9Deprecated since 1.9.- Parameters:
right
- the Phoneme to join- Returns:
- a new Phoneme
-
mergeWithLanguage
Returns a new Phoneme with the same text but a union of its current language set and the given one.- Parameters:
lang
- the language set to merge- Returns:
- a new Phoneme
-
size
Description copied from interface:Rule.PhonemeExpr
Gets the expression size in phonemes.- Specified by:
size
in interfaceRule.PhonemeExpr
- Returns:
- the expression size in phonemes.
-
toString
-