|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the methods for retrieving a single sequence of Tokens.
For TypeI results, each TokenSequence holds one row of result Tokens. For TypeII results, each TokenSequence is one potential interpretation of the utterance.
Each TokenSequence consists of several attributes, plus a sequence of Token Strings, and parallel sequences of TokenQualifiers and TokenScores.
Note: Some of these values are 'optional', and may not be supplied in the ASREvent. If not supplied, the return value is null, or for return values of type int the value will be -1.
ASREvent.getTokenSequence
Method Summary | |
java.lang.String |
getContextName()
Get the context from which the sequence is taken. |
java.lang.String |
getGrammarTag(int j)
Get the GrammarTag for the jth token in this sequence. |
Symbol |
getLanguage()
Get the language of the sequence. |
Symbol |
getLanguageVariant()
Get the language variant of the sequence. |
int |
getSequenceLength()
Get the number of tokens in this result sequence. |
Symbol |
getSequenceQualifier()
Get an overall qualifier of the sequence. |
int |
getSequenceScore()
Get the recognizer's confidence in the sequence of tokens. |
java.lang.String |
getSequenceSpeaker()
Get the name of the speaker of the sequence. |
java.lang.String |
getToken(int j)
Get the name of the jth token in this sequence. |
Symbol |
getTokenQualifier(int j)
Get the qualifier for the jth token in this sequence. |
int |
getTokenScore(int j)
Get the the recognizer's confidence for the jth token. |
Method Detail |
public int getSequenceLength()
public java.lang.String getToken(int j)
j
- index of the token to be returned.ASR.wordCommit(java.lang.String, java.lang.String, java.lang.String)
public Symbol getTokenQualifier(int j)
Possible values are
ASRConstants.v_Normal
,
ASRConstants.v_Garbage
, and
ASRConstants.v_Silence
.
For Type II results, the value may also be
ASRConstants.v_GrammarTag
.
j
- index of the token to be returned.public java.lang.String getGrammarTag(int j)
When getToken(j) is null, one should check getTokenQualifier(j) to see if there is a valid grammerTag in getGrammerTag(j). Note: This can probably be folded into getToken because the TokenQualifier indicates whether the jth element is a GrammarTag .
j
- index of the token for which the GrammarTag is returned.public int getTokenScore(int j)
Note: getTokenScore(0) should return -1 iff getTokenScore(i: i < sequenceLength) returns -1. An application should not need to check each value for validity.
j
- index of the token for which the confidence is returned.public java.lang.String getContextName()
public Symbol getLanguage()
public Symbol getLanguageVariant()
public java.lang.String getSequenceSpeaker()
public Symbol getSequenceQualifier()
ASRConstants.v_Normal
,
ASRConstants.v_Garbage
, and
ASRConstants.v_Silence
.public int getSequenceScore()
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |