public class PostLexicalAnalyzer extends Object implements UtteranceProcessor
Modifier and Type | Field and Description |
---|---|
private static PathExtractor |
N_PH_VC |
private static PathExtractor |
P_PH_VC |
private static PathExtractor |
wordPath |
Constructor and Description |
---|
PostLexicalAnalyzer()
Constructs a PostLexicalAnalyzer
|
Modifier and Type | Method and Description |
---|---|
private void |
fixApostrophe(Utterance utterance)
Fixes apostrophe s segments.
|
private void |
fixTheIy(Utterance utterance)
Changes the pronunciation of "the" from 'd ax' to 'd iy' if
the following word starts with a vowel.
|
private static void |
prependSchwa(Item item)
Prepends a schwa to the given item
|
void |
processUtterance(Utterance utterance)
Performs the post lexical processing.
|
String |
toString()
Returns the string representation of the object
|
private static final PathExtractor wordPath
private static final PathExtractor P_PH_VC
private static final PathExtractor N_PH_VC
public PostLexicalAnalyzer()
public void processUtterance(Utterance utterance) throws ProcessException
processUtterance
in interface UtteranceProcessor
utterance
- the utterance to processProcessException
- if an error occurs while
processing of the utteranceprivate void fixApostrophe(Utterance utterance)
utterance
- the utterance to fixprivate static void prependSchwa(Item item)
item
- the item to prepend the schwa to.private void fixTheIy(Utterance utterance)
utterance
- the utterance to processWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses