Class YSKRecognitionHypothesis

Object representing a single recognition hypothesis.

Each hypothesis has a confidence score, i.e., a fractional number between 0 and 1 estimating the measure of confidence in the recognition result (1 indicates the highest level of confidence).

A hypothesis has two representations:
  • A string that contains 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.

Note.

The confidence score is provided solely for informational purposes. Its calculation formula may be adjusted with time.

Instance Methods

Properties

confidence

Confidence score of the recognition hypothesis.

normalized

A string that contains the hypothesis text.

words

An array of words or phrases, each of which has a confidence score.

Method Detail

-initWithWords:normalizedText:confidence:

- (instancetype)initWithWords:(NSArray< YSKRecognitionWord * > *)words
               normalizedText:(NSString *)normalized
                   confidence:(CGFloat)confidence 

Initializes an object of the YSKRecognitionHypothesis class.

This method is a designated initializer for the YSKRecognitionHypothesis class.
Parameters:
words

An array of words or phrases, each of which has a confidence score.

normalized

A string that contains the hypothesis text.

confidence

Confidence score of the recognition hypothesis.

Returns:

An object of the YSKRecognitionHypothesis class.

Property Detail

confidence

(assign, readonly) CGFloat confidence

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

normalized

(copy, readonly) NSString * normalized

A string that contains the hypothesis text.

This can be considered the primary representation. Numbers in this text are written as digits, and punctuation and abbreviations are included.

words

(copy, readonly) NSArray< YSKRecognitionWord * > * words

An array of words or phrases, each of which has a confidence score.

This score can be used to determine poorly recognized fragments.