public class Pronunciation
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static Pronunciation |
UNKNOWN |
| Modifier | Constructor and Description |
|---|---|
protected |
Pronunciation(java.util.List<Unit> units)
Creates a pronunciation with defaults
|
protected |
Pronunciation(java.util.List<Unit> units,
java.lang.String tag,
float probability)
Creates a pronunciation
|
|
Pronunciation(Unit[] units,
java.lang.String tag,
float probability)
Creates a pronunciation
|
| Modifier and Type | Method and Description |
|---|---|
void |
dump()
Dumps a pronunciation
|
float |
getProbability()
Retrieves the probability for the pronunciation.
|
java.lang.String |
getTag()
Retrieves the tag associated with the pronunciation or null if there is no tag associated with this
pronunciation.
|
Unit[] |
getUnits()
Retrieves the units for this pronunciation
|
Word |
getWord()
Retrieves the word that this Pronunciation object represents.
|
void |
setWord(Word word)
Sets the word this pronunciation represents.
|
java.lang.String |
toDetailedString()
Returns a detailed string representation of this Pronunciation.
|
java.lang.String |
toString()
Returns a string representation of this Pronunication.
|
public static final Pronunciation UNKNOWN
public Pronunciation(Unit[] units, java.lang.String tag, float probability)
units - represents the pronunciationtag - a grammar specific tagprobability - the probability of this pronunciation occurringprotected Pronunciation(java.util.List<Unit> units, java.lang.String tag, float probability)
units - represents the pronunciationtag - a grammar specific tagprobability - the probability of this pronunciation occurringprotected Pronunciation(java.util.List<Unit> units)
units - represents the pronunciationpublic void setWord(Word word)
word - the Word this Pronunciation representspublic Word getWord()
public Unit[] getUnits()
public java.lang.String getTag()
public float getProbability()
TODO: FIX Note that probabilities are currently maintained in the linear domain (unlike just about everything else)
public void dump()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toDetailedString()