|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.incremental.unit.IU
inpro.incremental.unit.WordIU
public class WordIU
Nested Class Summary | |
---|---|
private class |
WordIU.ProsodicFeatures
|
Nested classes/interfaces inherited from class inpro.incremental.unit.IU |
---|
IU.IUUpdateListener, IU.Progress |
Field Summary | |
---|---|
(package private) static java.util.Map<java.lang.String,java.util.List<AVPair>> |
avPairs
|
(package private) boolean |
isSilence
|
(package private) edu.cmu.sphinx.linguist.dictionary.Pronunciation |
pron
|
private WordIU.ProsodicFeatures |
prosodicFeatures
|
(package private) java.lang.String |
word
|
Fields inherited from class inpro.incremental.unit.IU |
---|
creationTime, FIRST_IU, groundedIn, grounds, nextSameLevelLinks, previousSameLevelLink, updateListeners |
Constructor Summary | |
---|---|
|
WordIU(edu.cmu.sphinx.linguist.dictionary.Pronunciation pron,
WordIU sll,
java.util.List<IU> groundedIn)
|
protected |
WordIU(java.lang.String word,
edu.cmu.sphinx.linguist.dictionary.Pronunciation pron,
WordIU sll,
java.util.List<IU> groundedIn)
|
|
WordIU(java.lang.String spelling,
WordIU sll,
java.util.List<IU> groundedIn)
|
|
WordIU(WordIU sll)
create a new silent word |
Method Summary | |
---|---|
void |
appendMaryXML(java.lang.StringBuilder sb)
|
java.util.List<AVPair> |
getAVPairs()
|
SegmentIU |
getFirstSegment()
|
SegmentIU |
getLastSegment()
|
java.util.List<SegmentIU> |
getSegments()
|
java.util.List<java.lang.String> |
getValues(java.lang.String attribute)
Retrieves all values of an WordIU's AVPairs, given an attribute. |
static double |
getWER(java.util.List<WordIU> a,
java.util.List<WordIU> b)
calculate the WER between two lists of words based on the levenshtein distance code adapted from http://www.merriampark.com/ldjava.htm list a is taken as the reference for word error rate normalization |
java.lang.String |
getWord()
|
boolean |
hasAVPairs()
|
boolean |
hasProsody()
|
boolean |
isBackchannel()
|
boolean |
isSilence()
|
private static int |
min(int a,
int b,
int c)
three-way minimum used internally in getWER |
boolean |
pitchIsRising()
precondition: only call this if hasProsody() |
boolean |
pronunciationEquals(edu.cmu.sphinx.linguist.dictionary.Pronunciation pron)
|
boolean |
pronunciationEquals(WordIU iu)
|
static java.util.List<WordIU> |
removeSilentWords(java.util.List<WordIU> words)
returns a new list with all silent words removed |
static void |
setAVPairs(java.util.Map<java.lang.String,java.util.List<AVPair>> avPairs)
|
void |
shiftBy(double offset)
shift the start and end times of this (and possibly all following SysSegmentIUs |
static boolean |
spellingEqual(java.util.List<WordIU> a,
java.util.List<WordIU> b)
|
boolean |
spellingEquals(WordIU iu)
|
java.lang.StringBuilder |
toMbrolaLines()
|
java.lang.String |
toPayLoad()
|
void |
updateSegments(java.util.List<Label> newLabels)
|
void |
updateTimings(WordIU otherWord)
this operation updates the timings of the grounding segments to match those of another IU for the same word (in terms of spelling) |
static java.lang.String |
wordsToString(java.util.List<WordIU> words)
Builds a simple string from a list of wordIUs |
Methods inherited from class inpro.incremental.unit.IU |
---|
addNextSameLevelLink, addUpdateListener, commit, compareTo, connectSLL, deepToString, duration, endTime, equals, getAge, getAmongNextSameLevelLinks, getCreationTime, getID, getNextSameLevelLink, getNextSameLevelLinks, getOngoingGroundedIU, getProgress, getSameLevelLink, ground, groundedIn, groundIn, groundIn, grounds, hashCode, isCommitted, isCompleted, isOngoing, isRevoked, isUpcoming, notifyListeners, payloadEquals, removeAllNextSameLevelLinks, removeGrin, removeGrin, reorderNextSameLevelLink, revoke, setAsTopNextSameLevelLink, setSameLevelLink, startTime, toLabelLine, toString, toTEDviewXML, updateOnGrinUpdates |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static java.util.Map<java.lang.String,java.util.List<AVPair>> avPairs
final boolean isSilence
final edu.cmu.sphinx.linguist.dictionary.Pronunciation pron
final java.lang.String word
private WordIU.ProsodicFeatures prosodicFeatures
Constructor Detail |
---|
public WordIU(edu.cmu.sphinx.linguist.dictionary.Pronunciation pron, WordIU sll, java.util.List<IU> groundedIn)
public WordIU(java.lang.String spelling, WordIU sll, java.util.List<IU> groundedIn)
protected WordIU(java.lang.String word, edu.cmu.sphinx.linguist.dictionary.Pronunciation pron, WordIU sll, java.util.List<IU> groundedIn)
public WordIU(WordIU sll)
sll
- Method Detail |
---|
public boolean hasAVPairs()
public java.util.List<AVPair> getAVPairs()
public java.util.List<java.lang.String> getValues(java.lang.String attribute)
attribute
- the attribute to retrieve
public java.util.List<SegmentIU> getSegments()
public SegmentIU getFirstSegment()
public SegmentIU getLastSegment()
public void updateSegments(java.util.List<Label> newLabels)
public void updateTimings(WordIU otherWord)
otherWord
- the word to base the new timings onpublic boolean pronunciationEquals(edu.cmu.sphinx.linguist.dictionary.Pronunciation pron)
public boolean pronunciationEquals(WordIU iu)
public boolean spellingEquals(WordIU iu)
public java.lang.String getWord()
public void shiftBy(double offset)
public boolean isSilence()
public boolean isBackchannel()
public static void setAVPairs(java.util.Map<java.lang.String,java.util.List<AVPair>> avPairs)
public boolean hasProsody()
public boolean pitchIsRising()
public java.lang.String toPayLoad()
toPayLoad
in class IU
public static java.lang.String wordsToString(java.util.List<WordIU> words)
public java.lang.StringBuilder toMbrolaLines()
public void appendMaryXML(java.lang.StringBuilder sb)
public static java.util.List<WordIU> removeSilentWords(java.util.List<WordIU> words)
public static boolean spellingEqual(java.util.List<WordIU> a, java.util.List<WordIU> b)
public static double getWER(java.util.List<WordIU> a, java.util.List<WordIU> b)
private static final int min(int a, int b, int c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |