|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.result.Result
Provides recognition results. Results can be partial or final. A result should not be modified before it is a final result. Note that a result may not contain all possible information. The following methods are not yet defined but should be:
public Result getDAG(int compressionLevel);
Constructor Summary | |
Result(ActiveList activeList,
java.util.List resultList,
int frameNumber,
boolean isFinal,
LogMath logMath)
Creates a result |
|
Result(AlternateHypothesisManager alternateHypothesisManager,
ActiveList activeList,
java.util.List resultList,
int frameNumber,
boolean isFinal,
LogMath logMath)
Creates a result |
Method Summary | |
java.util.List |
findPartialMatchingTokens(java.lang.String text)
Searches through the n-best list to find the the branch that matches the beginning of the given string |
Token |
findToken(java.lang.String text)
Searches through the n-best list to find the the branch that matches the given string |
ActiveList |
getActiveTokens()
Returns a list of active tokens for this result. |
AlternateHypothesisManager |
getAlternateHypothesisManager()
Returns the AlternateHypothesisManager Used to construct a Lattice |
Token |
getBestActiveParitalMatchingToken(java.lang.String text)
Returns the best scoring token that matches the beginning of the given text. |
Token |
getBestActiveToken()
Returns the best scoring token in the active set |
java.lang.String |
getBestFinalResultNoFiller()
Returns the string of the best final result, removing any filler words. |
Token |
getBestFinalToken()
Returns the best scoring final token in the result. |
java.lang.String |
getBestResultNoFiller()
Returns the string of the best result, removing any filler words. |
Token |
getBestToken()
Returns the best scoring token in the result. |
Data[] |
getDataFrames()
Gets the feature frames associated with this result |
int |
getEndFrame()
Gets the ending frame number for the result |
int |
getFrameNumber()
Returns the current frame number |
FrameStatistics[] |
getFrameStatistics()
Returns detailed frame statistics for this result |
LogMath |
getLogMath()
Returns the log math used for this Result. |
java.lang.String |
getReferenceText()
Retrieves the reference text. |
java.util.List |
getResultTokens()
Returns a list of result tokens for this result. |
int |
getStartFrame()
Gets the starting frame number for the result |
java.lang.String |
getTimedBestResult(boolean wantFiller,
boolean wordTokenFirst)
Returns the string of words (with timestamp) for this token. |
boolean |
isFinal()
Determines if the result is a final result. |
void |
setReferenceText(java.lang.String ref)
Sets the reference text |
java.lang.String |
toString()
Returns a string representation of this object |
boolean |
validate()
Determines if the Result is valid. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Result(AlternateHypothesisManager alternateHypothesisManager, ActiveList activeList, java.util.List resultList, int frameNumber, boolean isFinal, LogMath logMath)
activeList
- the active list associated with this resultresultList
- the result list associated with this resultframeNumber
- the frame number for this result.isFinal
- if true, the result is a final resultpublic Result(ActiveList activeList, java.util.List resultList, int frameNumber, boolean isFinal, LogMath logMath)
activeList
- the active list associated with this resultresultList
- the result list associated with this resultframeNumber
- the frame number for this result.isFinal
- if true, the result is a final resultMethod Detail |
public boolean isFinal()
SearchManager.recognize
calls.
public LogMath getLogMath()
public ActiveList getActiveTokens()
Token
objects that
represents the leaf nodes of all active branches in the result
(sometimes referred to as the 'lattice').
The lattice is live and may be modified by a
SearchManager during a recognition. Once the Result is final,
the lattice is fixed and will no longer be modified by the
SearchManager. Applications can modify the lattice (to prepare
for a re-recognition, for example) only after
isFinal
returns true
Token
public java.util.List getResultTokens()
Token
objects that
represents the leaf nodes of all final branches in the result
(sometimes referred to as the 'lattice').
The lattice is live and may be modified by a
SearchManager during a recognition. Once the Result is final,
the lattice is fixed and will no longer be modified by the
SearchManager. Applications can modify the lattice (to prepare
for a re-recognition, for example) only after
isFinal
returns true
Token
public AlternateHypothesisManager getAlternateHypothesisManager()
public int getFrameNumber()
public Token getBestFinalToken()
public Token getBestToken()
public Token getBestActiveToken()
public Token findToken(java.lang.String text)
text
- the string to search for
public java.util.List findPartialMatchingTokens(java.lang.String text)
text
- the string to search for
public Token getBestActiveParitalMatchingToken(java.lang.String text)
text
- the text to matchpublic FrameStatistics[] getFrameStatistics()
null
if no frame statistics
are available.public int getStartFrame()
public int getEndFrame()
public Data[] getDataFrames()
public java.lang.String getBestResultNoFiller()
public java.lang.String getBestFinalResultNoFiller()
public java.lang.String getTimedBestResult(boolean wantFiller, boolean wordTokenFirst)
wantFiller
- true if we want filler words included, false otherwisewordTokenFirst
- true if the word tokens come before other types
of tokens
public java.lang.String toString()
public boolean validate()
public void setReferenceText(java.lang.String ref)
ref
- the reference textpublic java.lang.String getReferenceText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |