public class Grammar
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static interface |
Grammar.Status
The status of the grammar: * `analyzed`: The service successfully analyzed the grammar.
|
Modifier and Type | Method and Description |
---|---|
String |
getError()
Gets the error.
|
String |
getName()
Gets the name.
|
Long |
getOutOfVocabularyWords()
Gets the outOfVocabularyWords.
|
String |
getStatus()
Gets the status.
|
public String getName()
The name of the grammar.
public Long getOutOfVocabularyWords()
_For custom models that are based on previous-generation models_, the number of OOV words extracted from the grammar. The value is `0` while the grammar is being processed.
_For custom models that are based on next-generation models_, no OOV words are extracted from grammars, so the value is always `0`.
public String getStatus()
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.
public String getError()
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'.`.
Copyright © 2024 IBM Cloud. All rights reserved.