YSKRecognitionHypothesis class

#import <YSKRecognitionHypothesis.h>

Represents a single recognition hypothesis.

The structure contains the text of the hypothesis and its confidence score.

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

If the confidence score is not available, the special value kYSKBadConfidence is used.

Note.

The confidence score is provided solely for informational purposes. The formula for calculating the score might be adjusted over time, so don't make decisions based on the absolute score. Use YSKRecognition::resultConfident instead.

Instance methods

- initWithText:confidence:

Initiates a recognition hypothesis with the set text and confidence score.

- stringValue

String representation of the result.

Class methods

+ badRecognitionHypothesis

Returns a special hypothesis indicating that the hypothesis is invalid.

Properties

confidence

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

text

Method descriptions

+ badRecognitionHypothesis

+ (instancetype) badRecognitionHypothesis

Returns a special hypothesis indicating that the hypothesis is invalid.

- initWithText:confidence:

- (instancetype) initWithText:(NSString *) text
confidence:(float) confidence

Initiates a recognition hypothesis with the set text and confidence score.

- stringValue

- (NSString *) stringValue

String representation of the result.

Property descriptions

confidence

(assign, readonly) float 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).

text

(copy, readonly) NSString * text

The text of the recognition hypothesis.