Class CreateModelOptions

All Implemented Interfaces:

public class CreateModelOptions
The createModel options.
  • Method Details

    • newBuilder

      public CreateModelOptions.Builder newBuilder()
      New builder.
      a CreateModelOptions builder
    • baseModelId

      public String baseModelId()
      Gets the baseModelId.

      The ID of the translation model to use as the base for customization. To see available models and IDs, use the `List models` method. Most models that are provided with the service are customizable. In addition, all models that you create with parallel corpora customization can be further customized with a forced glossary.

      the baseModelId
    • forcedGlossary

      public InputStream forcedGlossary()
      Gets the forcedGlossary.

      A file with forced glossary terms for the source and target languages. The customizations in the file completely overwrite the domain translation data, including high frequency or high confidence phrase translations.

      You can upload only one glossary file for a custom model, and the glossary can have a maximum size of 10 MB. A forced glossary must contain single words or short phrases. For more information, see **Supported file formats** in the method description.

      *With `curl`, use `--form forced_glossary=@{filename}`.*.

      the forcedGlossary
    • parallelCorpus

      public InputStream parallelCorpus()
      Gets the parallelCorpus.

      A file with parallel sentences for the source and target languages. You can upload multiple parallel corpus files in one request by repeating the parameter. All uploaded parallel corpus files combined must contain at least 5000 parallel sentences to train successfully. You can provide a maximum of 500,000 parallel sentences across all corpora.

      A single entry in a corpus file can contain a maximum of 80 words. All corpora files for a custom model can have a cumulative maximum size of 250 MB. For more information, see **Supported file formats** in the method description.

      *With `curl`, use `--form parallel_corpus=@{filename}`.*.

      the parallelCorpus
    • name

      public String name()
      Gets the name.

      An optional model name that you can use to identify the model. Valid characters are letters, numbers, dashes, underscores, spaces, and apostrophes. The maximum length of the name is 32 characters.

      the name