static final class PhoneticEngine.PhonemeBuilder extends Object
PhoneticEngine
class.Modifier and Type | Field and Description |
---|---|
private Set<Rule.Phoneme> |
phonemes |
Modifier | Constructor and Description |
---|---|
private |
PhonemeBuilder(Rule.Phoneme phoneme) |
private |
PhonemeBuilder(Set<Rule.Phoneme> phonemes) |
Modifier and Type | Method and Description |
---|---|
void |
append(CharSequence str)
Creates a new phoneme builder containing all phonemes in this one extended by
str . |
void |
apply(Rule.PhonemeExpr phonemeExpr,
int maxPhonemes)
Applies the given phoneme expression to all phonemes in this phoneme builder.
|
static PhoneticEngine.PhonemeBuilder |
empty(Languages.LanguageSet languages)
An empty builder where all phonemes must come from some set of languages.
|
Set<Rule.Phoneme> |
getPhonemes()
Gets underlying phoneme set.
|
String |
makeString()
Stringifies the phoneme set.
|
private final Set<Rule.Phoneme> phonemes
private PhonemeBuilder(Rule.Phoneme phoneme)
private PhonemeBuilder(Set<Rule.Phoneme> phonemes)
public static PhoneticEngine.PhonemeBuilder empty(Languages.LanguageSet languages)
languages
- the set of languagespublic void append(CharSequence str)
str
.str
- the characters to append to the phonemespublic void apply(Rule.PhonemeExpr phonemeExpr, int maxPhonemes)
This will lengthen phonemes that have compatible language sets to the expression, and drop those that are incompatible.
phonemeExpr
- the expression to applymaxPhonemes
- the maximum number of phonemes to build uppublic Set<Rule.Phoneme> getPhonemes()
public String makeString()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses