Package com.sun.speech.freetts.en.us
Class FeatureProcessors
- java.lang.Object
-
- com.sun.speech.freetts.en.us.FeatureProcessors
-
public class FeatureProcessors extends java.lang.ObjectProvides the set of feature processors that are used by this language as part of the CART processing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFeatureProcessors.AccentedChecks to see if the given syllable is accented.static classFeatureProcessors.AccentedSylInCounts the number of accented syllables since the last major break.static classFeatureProcessors.GposReturns a guess of the part-of-speech.static classFeatureProcessors.LastAccentFind the last accented syllable This is a feature processor.static classFeatureProcessors.MonthRangeReturns true ("1") if the given item is a number between 0 and 32 exclusive, otherwise, returns "0".static classFeatureProcessors.NumDigitsReturns the length of the string.static classFeatureProcessors.PH_CPlaceReturn consonant cplace l-labial a-alveolar p-palatal b-labio_dental d-dental v-velar This is a feature processor.static classFeatureProcessors.PH_CTypeReturn consonant type s-stop f-fricative a-affricative n-nasal * l-liquid This is a feature processor.static classFeatureProcessors.PH_CVoxReturn consonant voicing +=on -=off This is a feature processor.static classFeatureProcessors.PH_VCReturn vowel or consonant +=on -=off This is a feature processor.static classFeatureProcessors.PH_VFrontReturn vowel frontness 1-front 2-mid 3-back This is a feature processor.static classFeatureProcessors.PH_VHeightReturn vowel height 1-high 2-mid 3-low This is a feature processor.static classFeatureProcessors.PH_VLengthReturn vowel length s-short l-long d-dipthong a-schwa This is a feature processor.static classFeatureProcessors.PH_VRndReturn vowel rnd (lip rounding) lip rounding +=on -=off This is a feature processor.static classFeatureProcessors.PosInSylFinds the position of the phoneme in the syllable This is a feature processor.static classFeatureProcessors.PositionTypeClassifies the the syllable as single, initial, mid or final.static classFeatureProcessors.SegCodaFricChecks for fricative This is a feature processor.static classFeatureProcessors.SegCodaGlideChecks for coda glide This is a feature processor.static classFeatureProcessors.SegCodaNasalChecks for coda nasal This is a feature processor.static classFeatureProcessors.SegCodaStopChecks for coda stop This is a feature processor.static classFeatureProcessors.SegmentDurationReturns the duration of the given segment This is a feature processor.static classFeatureProcessors.SegOnsetCodaChecks for onset coda This is a feature processor.static classFeatureProcessors.SegOnsetFricChecks for fricative This is a feature processor.static classFeatureProcessors.SegOnsetGlideChecks for onset glide This is a feature processor.static classFeatureProcessors.SegOnsetNasalChecks for onset nasal This is a feature processor.static classFeatureProcessors.SegOnsetStopChecks for onset stop This is a feature processor.static classFeatureProcessors.StressedSylInCounts the number of stressed syllables since the last major break.static classFeatureProcessors.StressedSylOutCounts the number of stressed syllables until the next major break.static classFeatureProcessors.SubPhrasesCounts the number of phrases before this one.static classFeatureProcessors.SylBreakDetermines the break level after this syllable This is a feature processor.static classFeatureProcessors.SylCodaSizeDetermines the coda size This is a feature processor.static classFeatureProcessors.SylInCounts the number of stressed syllables since the last major break.static classFeatureProcessors.SylOnsetSizeDetermines the onset size of this syllable This is a feature processor.static classFeatureProcessors.SylOutCounts the number of stressed syllables since the last major break.static classFeatureProcessors.TokenPosGuessAttempts to guess the part of speech.static classFeatureProcessors.WordBreakDetermines the word break.static classFeatureProcessors.WordNumSylsReturns as an Integer the number of syllables in the given word.static classFeatureProcessors.WordPuncDetermines the word punctuation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetPhoneFeature(Item item, java.lang.String featureName)Gets the phoneset feature with the given namestatic java.lang.StringwordBreak(Item item)Classifies the type of word breakstatic java.lang.StringwordPunc(Item item)Gets the punctuation associated with the word
-
-
-
Method Detail
-
getPhoneFeature
public static java.lang.String getPhoneFeature(Item item, java.lang.String featureName)
Gets the phoneset feature with the given name- Parameters:
item- item the phoneme of interestfeatureName- the feature of interest- Returns:
- the phone feature for the item
-
wordBreak
public static java.lang.String wordBreak(Item item) throws ProcessException
Classifies the type of word break- Parameters:
item- the item to process- Returns:
- "4" for a big break, "3" for a break; otherwise "1"
- Throws:
ProcessException- if an exception occurred during the processing
-
wordPunc
public static java.lang.String wordPunc(Item item) throws ProcessException
Gets the punctuation associated with the word- Parameters:
item- the word to process- Returns:
- the punctuation associated with the word
- Throws:
ProcessException- if an exception occurred during the processing
-
-