java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.speech_to_text.v1.model.Corpus
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class Corpus
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Information about a corpus from a custom language model.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  Corpus.Status
    The status of the corpus: * `analyzed`: The service successfully analyzed the corpus.
  • Constructor Summary

    Constructors
    Constructor Description
    Corpus()  
  • Method Summary

    Modifier and Type Method Description
    String getError()
    Gets the error.
    String getName()
    Gets the name.
    Long getOutOfVocabularyWords()
    Gets the outOfVocabularyWords.
    String getStatus()
    Gets the status.
    Long getTotalWords()
    Gets the totalWords.

    Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel

    equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Corpus

      public Corpus()
  • Method Details

    • getName

      public String getName()
      Gets the name.

      The name of the corpus.

      Returns:
      the name
    • getTotalWords

      public Long getTotalWords()
      Gets the totalWords.

      The total number of words in the corpus. The value is `0` while the corpus is being processed.

      Returns:
      the totalWords
    • getOutOfVocabularyWords

      public Long getOutOfVocabularyWords()
      Gets the outOfVocabularyWords.

      _For custom models that are based on previous-generation models_, the number of OOV words extracted from the corpus. The value is `0` while the corpus is being processed.

      _For custom models that are based on next-generation models_, no OOV words are extracted from corpora, so the value is always `0`.

      Returns:
      the outOfVocabularyWords
    • getStatus

      public String getStatus()
      Gets the status.

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

      Returns:
      the status
    • getError

      public String getError()
      Gets the error.

      If the status of the corpus is `undetermined`, the following message: `Analysis of corpus 'name' failed. Please try adding the corpus again by setting the 'allow_overwrite' flag to 'true'`.

      Returns:
      the error