public class Segmenter extends 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.Modifier and Type | Field and Description |
---|---|
private static String |
NO_STRESS |
private static String |
STRESS |
Constructor and Description |
---|
Segmenter() |
Modifier and Type | Method and Description |
---|---|
protected String |
deStress(String phone)
Converts stressed phoneme to regular phoneme.
|
protected boolean |
isStressed(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 . |
String |
toString()
Returns the simple name of this class.
|
private static final String STRESS
private static final String NO_STRESS
public Segmenter()
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(String phone)
phone
- the phone to checkprotected String deStress(String phone)
phone
- the phone to convertWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses