public class FeatureProcessors extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FeatureProcessors.Accented
Checks to see if the given syllable is accented.
|
static class |
FeatureProcessors.AccentedSylIn
Counts the number of accented syllables since the last major break.
|
static class |
FeatureProcessors.Gpos
Returns a guess of the part-of-speech.
|
static class |
FeatureProcessors.LastAccent
Find the last accented syllable
This is a feature processor.
|
static class |
FeatureProcessors.MonthRange
Returns true ("1") if the given item is a number between 0 and
32 exclusive, otherwise, returns "0".
|
static class |
FeatureProcessors.NumDigits
Returns the length of the string.
|
static class |
FeatureProcessors.PH_CPlace
Return consonant cplace
l-labial a-alveolar p-palatal b-labio_dental d-dental v-velar
This is a feature processor.
|
static class |
FeatureProcessors.PH_CType
Return consonant type
s-stop f-fricative a-affricative n-nasal * l-liquid
This is a feature processor.
|
static class |
FeatureProcessors.PH_CVox
Return consonant voicing
+=on -=off
This is a feature processor.
|
static class |
FeatureProcessors.PH_VC
Return vowel or consonant
+=on -=off
This is a feature processor.
|
static class |
FeatureProcessors.PH_VFront
Return vowel frontness
1-front 2-mid 3-back
This is a feature processor.
|
static class |
FeatureProcessors.PH_VHeight
Return vowel height
1-high 2-mid 3-low
This is a feature processor.
|
static class |
FeatureProcessors.PH_VLength
Return vowel length
s-short l-long d-dipthong a-schwa
This is a feature processor.
|
static class |
FeatureProcessors.PH_VRnd
Return vowel rnd (lip rounding)
lip rounding +=on -=off
This is a feature processor.
|
static class |
FeatureProcessors.PosInSyl
Finds the position of the phoneme in the syllable
This is a feature processor.
|
static class |
FeatureProcessors.PositionType
Classifies the the syllable as single, initial, mid or final.
|
static class |
FeatureProcessors.SegCodaFric
Checks for fricative
This is a feature processor.
|
static class |
FeatureProcessors.SegCodaGlide
Checks for coda glide
This is a feature processor.
|
static class |
FeatureProcessors.SegCodaNasal
Checks for coda nasal
This is a feature processor.
|
static class |
FeatureProcessors.SegCodaStop
Checks for coda stop
This is a feature processor.
|
static class |
FeatureProcessors.SegmentDuration
Returns the duration of the given segment
This is a feature processor.
|
static class |
FeatureProcessors.SegOnsetCoda
Checks for onset coda
This is a feature processor.
|
static class |
FeatureProcessors.SegOnsetFric
Checks for fricative
This is a feature processor.
|
static class |
FeatureProcessors.SegOnsetGlide
Checks for onset glide
This is a feature processor.
|
static class |
FeatureProcessors.SegOnsetNasal
Checks for onset nasal
This is a feature processor.
|
static class |
FeatureProcessors.SegOnsetStop
Checks for onset stop
This is a feature processor.
|
static class |
FeatureProcessors.StressedSylIn
Counts the number of stressed syllables since the last major break.
|
static class |
FeatureProcessors.StressedSylOut
Counts the number of stressed syllables until the next major break.
|
static class |
FeatureProcessors.SubPhrases
Counts the number of phrases before this one.
|
static class |
FeatureProcessors.SylBreak
Determines the break level after this syllable
This is a feature processor.
|
static class |
FeatureProcessors.SylCodaSize
Determines the coda size
This is a feature processor.
|
static class |
FeatureProcessors.SylIn
Counts the number of stressed syllables since the last major break.
|
static class |
FeatureProcessors.SylOnsetSize
Determines the onset size of this syllable
This is a feature processor.
|
static class |
FeatureProcessors.SylOut
Counts the number of stressed syllables since the last major break.
|
static class |
FeatureProcessors.TokenPosGuess
Attempts to guess the part of speech.
|
static class |
FeatureProcessors.WordBreak
Determines the word break.
|
static class |
FeatureProcessors.WordNumSyls
Returns as an Integer the number of syllables in the given
word.
|
static class |
FeatureProcessors.WordPunc
Determines the word punctuation.
|
Modifier and Type | Field and Description |
---|---|
private static Set |
days |
private static Pattern |
DIGITS_PATTERN |
private static Pattern |
DOUBLE_PATTERN |
private static PathExtractor |
FIRST_SYLLABLE_PATH |
private static PathExtractor |
LAST_LAST_SYLLABLE_PATH |
private static PathExtractor |
LAST_SYLLABLE_PATH |
private static Set |
months |
private static PathExtractor |
SUB_PHRASE_PATH |
Modifier | Constructor and Description |
---|---|
private |
FeatureProcessors() |
Modifier and Type | Method and Description |
---|---|
static String |
getPhoneFeature(Item item,
String featureName)
Gets the phoneset feature with the given name
|
private static boolean |
isAccented(Item item)
Determines if the given item is accented
|
private static int |
rail(int val)
Rails an int. flite never returns an int more than 19 from
a feature processor, we duplicate that behavior
here so that our tests will match.
|
private static String |
segCodaCtype(Item seg,
String ctype)
Tests the coda ctype of the given segment.
|
private static String |
segOnsetCtype(Item seg,
String ctype)
Tests the onset ctype of the given segment.
|
static String |
wordBreak(Item item)
Classifies the type of word break
|
static String |
wordPunc(Item item)
Gets the punctuation associated with the word
|
private static final PathExtractor FIRST_SYLLABLE_PATH
private static final PathExtractor LAST_SYLLABLE_PATH
private static final PathExtractor LAST_LAST_SYLLABLE_PATH
private static final PathExtractor SUB_PHRASE_PATH
private static final Pattern DOUBLE_PATTERN
private static final Pattern DIGITS_PATTERN
private FeatureProcessors()
public static String getPhoneFeature(Item item, String featureName)
item
- item the phoneme of interestfeatureName
- the feature of interestpublic static String wordBreak(Item item) throws ProcessException
item
- the item to processProcessException
- if an exception occurred during the
processingpublic static String wordPunc(Item item) throws ProcessException
item
- the word to processProcessException
- if an exception occurred during the
processingprivate static String segCodaCtype(Item seg, String ctype)
seg
- the segment to testctype
- the ctype to check forprivate static String segOnsetCtype(Item seg, String ctype)
seg
- the segment to test to processctype
- the ctype to check forprivate static boolean isAccented(Item item)
item
- the item of interesttrue
if the item is accented, otherwise
false
private static int rail(int val)
val
- the value to railWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses