UtteranceProcessor
public class Segmenter extends java.lang.Object implements UtteranceProcessor
Relation.SYLLABLE
,
Relation.SYLLABLE_STRUCTURE
, and
Relation.SEGMENT
.
To determine stress, the isStressed
method relies upon
a phone ending in the number "1". Subclasses should override
isStressed
and deStress
if stresses are
determined in other ways.Constructor | Description |
---|---|
Segmenter() |
Modifier and Type | Method | Description |
---|---|---|
protected java.lang.String |
deStress(java.lang.String phone) |
Converts stressed phoneme to regular phoneme.
|
protected boolean |
isStressed(java.lang.String phone) |
Determines if the given phonemene is stressed.
|
void |
processUtterance(Utterance utterance) |
Annotates an utterance with
Relation.SYLLABLE ,
Relation.SYLLABLE_STRUCTURE , and
Relation.SEGMENT . |
java.lang.String |
toString() |
Returns the simple name of this class.
|
public void processUtterance(Utterance utterance) throws ProcessException
Relation.SYLLABLE
,
Relation.SYLLABLE_STRUCTURE
, and
Relation.SEGMENT
.processUtterance
in interface UtteranceProcessor
utterance
- the utterance to process/tokenizeProcessException
- if an IOException is thrown during the
processing of the utteranceRelation.SEGMENT
,
Relation.SYLLABLE
,
Relation.SYLLABLE_STRUCTURE
protected boolean isStressed(java.lang.String phone)
phone
- the phone to checkprotected java.lang.String deStress(java.lang.String phone)
phone
- the phone to convertpublic java.lang.String toString()
toString
in class java.lang.Object