RecognitionHypothesis class
ru.yandex.speechkit
public class RecognitionHypothesis
Object representing a single recognition hypothesis.
Each hypothesis has a confidence score — a fraction between 0 and 1 reflecting the level of confidence in its "correctness".
-
A string containing the hypothesis text. This can be considered the primary representation. Numbers in this text are written as digits, and punctuation and abbreviations are included.
-
An array of words or phrases, each of which has a confidence score. This score can be used to determine poorly recognized fragments.
The confidence score is provided solely for informational purposes. Its calculation formula may be adjusted with time.
Constructors
RecognitionHypothesis(RecognitionWord[] words, String normalized, float confidence) | Creates an object of the RecognitionHypothesis class. |
RecognitionHypothesis(RecognitionWord[] words, String normalized, float confidence) | Creates an object of the RecognitionHypothesis class. |
Methods
float | getConfidence() | Confidence score of the recognition hypothesis. |
String | getNormalized() | A string containing the hypothesis text. |
RecognitionWord[] | getWords() | An array of words, each with a confidence score. |
float | getConfidence() | Confidence score of the recognition hypothesis. |
String | getNormalized() | A string containing the hypothesis text. |
RecognitionWord[] | getWords() | An array of words, each with a confidence score. |
Constructor descriptions
RecognitionHypothesis
public RecognitionHypothesis (RecognitionWord[] words, String normalized, float confidence)
Creates an object of the RecognitionHypothesis class.
words | Array of words. |
confidence | Confidence score of the recognition hypothesis. |
words | Array of words. |
confidence | Confidence score of the recognition hypothesis. |
Method descriptions
getConfidence
public float getConfidence ()
Confidence score of the recognition hypothesis.
The confidence score is a fractional number between 0 and 1 estimating the measure of confidence in the recognition result (1 indicates the highest level of confidence).getNormalized
public String getNormalized ()
A string containing the hypothesis text.
This can be considered the primary representation. Numbers in this text are written as digits, and punctuation and abbreviations are included.getWords
public RecognitionWord[] getWords ()
An array of words, each with a confidence score.
This score can be used to determine poorly recognized fragments.