Grammar

public struct Grammar : Codable, Equatable

Information about a grammar from a custom language model.

  • The status of the grammar:

    • analyzed: The service successfully analyzed the grammar. The custom model can be trained with data from the grammar.
    • being_processed: The service is still analyzing the grammar. The service cannot accept requests to add new resources or to train the custom model.
    • undetermined: The service encountered an error while processing the grammar. The error field describes the failure.
    See more

    Declaration

    Swift

    public enum Status : String
  • The name of the grammar.

    Declaration

    Swift

    public var name: String
  • The number of OOV words in the grammar. The value is 0 while the grammar is being processed.

    Declaration

    Swift

    public var outOfVocabularyWords: Int
  • The status of the grammar:

    • analyzed: The service successfully analyzed the grammar. The custom model can be trained with data from the grammar.
    • being_processed: The service is still analyzing the grammar. The service cannot accept requests to add new resources or to train the custom model.
    • undetermined: The service encountered an error while processing the grammar. The error field describes the failure.

    Declaration

    Swift

    public var status: String
  • If the status of the grammar is undetermined, the following message: Analysis of grammar '{grammar_name}' failed. Please try fixing the error or adding the grammar again by setting the 'allow_overwrite' flag to 'true'..

    Declaration

    Swift

    public var error: String?