Compartilhar via


Class SPXPhraseListGrammar

Declaration

@class SPXPhraseListGrammar : SPXGrammar;

Description

Represents a phrase list grammar for dynamic grammar scenarios.

Added in version 1.5.0.

Methods

initWithRecognizer:

Creates a phrase list grammar for the specified recognizer.

- (instancetype _Nullable)initWithRecognizer:(SPXRecognizer * _Nonnull)recognizer

Parameters

  • recognizer - The recognizer from which to obtain the phrase list grammar.

Returns

a phrase list grammar instance.

addPhrase:

Adds a simple phrase that may be spoken by the user.

- (void)addPhrase:(NSString * _Nonnull)phrase

Parameters

  • phrase - The phrase to be added.

clear

Clears all phrases from the phrase list grammar.

- (void)clear