|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap
edu.cmu.sphinx.result.ConfusionSet
public class ConfusionSet
A confusion set is a set of words with their associated posteriors. In Java terms it's a SortedMap from posteriors to sets of WordResults, but the class is called a set because that's what this beast is known as in the literature.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
ConfusionSet()
|
Method Summary | |
---|---|
void |
addWordHypothesis(WordResult word)
Add a word hypothesis to this confusion set. |
boolean |
containsFiller()
Check whether this confusion set contains any fillers. |
boolean |
containsWord(java.lang.String word)
Check whether this confusion set contains the given word |
void |
dump(java.lang.String name)
Dumps out the contents of this ConfusionSet. |
WordResult |
getBestHypothesis()
Return the single best hypothesis. |
java.util.Set |
getBestHypothesisSet()
Return the set of best hypothesis. |
double |
getBestPosterior()
Get the highest posterior (confidence) stored in this set. |
WordResult |
getWordResult(java.lang.String word)
Returns the WordResult in this ConfusionSet for the given word. |
java.util.Set |
getWordSet(double posterior)
Get the word set with this confidence. |
java.lang.String |
toString()
|
Methods inherited from class java.util.TreeMap |
---|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, isEmpty |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode, isEmpty |
Constructor Detail |
---|
public ConfusionSet()
Method Detail |
---|
public void addWordHypothesis(WordResult word)
word
- the hypothesis to addpublic java.util.Set getWordSet(double posterior)
posterior
- the confidence (posterior)
public java.util.Set getBestHypothesisSet()
public WordResult getBestHypothesis()
public double getBestPosterior()
public boolean containsWord(java.lang.String word)
word
- the word to look for
public boolean containsFiller()
public WordResult getWordResult(java.lang.String word)
word
- the word to look for
public void dump(java.lang.String name)
name
- the name of the confusion setpublic java.lang.String toString()
toString
in class java.util.AbstractMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |