|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarch.Polyphone
public class Polyphone
A polyphone consists of a central phone, its left and right context and the statistical models linked to it. The polyphone inventory is fixed, the tree structure references to these instances on demand.
Field Summary | |
---|---|
HMM |
hmm
acoustic model associated with this polyphone |
long |
INSTANCE_ID
unique ID |
int |
occurrences
number of occurrences in the training set |
static java.lang.String |
SB
syllable boundary |
static java.lang.String |
WB
word boundary |
Constructor Summary | |
---|---|
Polyphone(java.lang.String monophone)
Create a monophone without context. |
|
Polyphone(java.lang.String[] left,
java.lang.String phone,
java.lang.String[] right)
Create a polyphone with the given context. |
Method Summary | |
---|---|
void |
addChild(Polyphone child)
Add a Polyphone to the hierarchy |
boolean |
equals(java.lang.Object o)
|
boolean |
equals(Polyphone p)
|
boolean |
equals(java.lang.String phoneInContext)
|
static Polyphone[] |
extractPolyphonesFromWordTranscription(java.lang.String[] trans)
Extract all possible polyphones from the given word transcription. |
boolean |
generalizes(Polyphone p)
Check whether or not the polyphone generalizes the referenced polyphone NB: An equal polyphone is not a generalization! |
int |
hashCode()
Obtain a hash value using the string representation of the polyphone |
java.lang.String |
hierarchyAsDotFormat(boolean includeHeader)
Generate a String representation of the hierarchy using the .dot format |
java.lang.String |
hierarchyAsString()
Generate a String representation of the hierarchy using ASCII art |
boolean |
isBiphone()
|
boolean |
isMonophone()
|
boolean |
isTriphone()
|
boolean |
matchesTranscription(java.lang.String[] transcription,
int position)
Check if the the polyphone and its context matches a transcription at a given point |
void |
pruneHierarchy()
Prune the phoneme hierarchy to remove extra "idle" links. |
void |
pruneHierarchyByOccurrence(int minOcc)
Prune the phoneme hierarchy by removing polyphones appearing less than minOcc times (recursive call). |
void |
resetOccurrenceCounter()
Reset the occurrence counter of this polyphone and its children |
boolean |
specializes(Polyphone p)
Check whether or not the polyphone specializes the referenced polyphone. |
java.lang.String |
toString()
Obtain a string representation of the polyphone, e.g. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public HMM hmm
public final long INSTANCE_ID
public int occurrences
public static final java.lang.String SB
public static final java.lang.String WB
Constructor Detail |
---|
public Polyphone(java.lang.String monophone)
monophone
- public Polyphone(java.lang.String[] left, java.lang.String phone, java.lang.String[] right)
left
- phone
- right
- Method Detail |
---|
public void addChild(Polyphone child)
child
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Polyphone p)
public boolean equals(java.lang.String phoneInContext)
public static Polyphone[] extractPolyphonesFromWordTranscription(java.lang.String[] trans)
trans
- Transcription of a single word in form of a String
array of phonemes. Make sure you have leading and trailing word
boundaries and syllabe boundaries (if desired).
public boolean generalizes(Polyphone p)
p
-
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String hierarchyAsDotFormat(boolean includeHeader)
public java.lang.String hierarchyAsString()
public boolean isBiphone()
public boolean isMonophone()
public boolean isTriphone()
public boolean matchesTranscription(java.lang.String[] transcription, int position)
transcription
- transcription of the target wordposition
- index of the central phone
public void pruneHierarchy()
public void pruneHierarchyByOccurrence(int minOcc)
minOcc
- minimum number of occurrencespublic void resetOccurrenceCounter()
public boolean specializes(Polyphone p)
p
-
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |