RecognitionHypothesis class

ru.yandex.speechkit

public  class  RecognitionHypothesis 

Object representing a single recognition hypothesis.

Each hypothesis has a confidence score — a number between 0 and 1 reflecting the level of confidence in its "correctness".

A hypothesis has two representations:
  1. A string containing the hypothesis text. This can be considered the primary representation. Numbers in this text are usually written as digits, and punctuation and abbreviations are included.

  2. An array of words or phrases, each of which has a confidence score. This score can be used to determine poorly recognized fragments.

Note.

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)

Methods

floatgetConfidence()

Confidence score of the recognition hypothesis.

StringgetNormalized()

A string containing the hypothesis text.

RecognitionWord[]getWords()

An array of words, each with a confidence score.

StringtoString()

Constructor descriptions

RecognitionHypothesis

public RecognitionHypothesis (RecognitionWord[] words, String normalized, float confidence)

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 usually 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.

toString

public String toString ()