public class CreateModelOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
CreateModelOptions.Builder
Builder.
|
Modifier and Type | Method and Description |
---|---|
String |
baseModelId()
Gets the baseModelId.
|
InputStream |
forcedGlossary()
Gets the forcedGlossary.
|
String |
forcedGlossaryContentType()
Gets the forcedGlossaryContentType.
|
String |
name()
Gets the name.
|
CreateModelOptions.Builder |
newBuilder()
New builder.
|
InputStream |
parallelCorpus()
Gets the parallelCorpus.
|
String |
parallelCorpusContentType()
Gets the parallelCorpusContentType.
|
public CreateModelOptions.Builder newBuilder()
public String 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.
public InputStream 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}`.*.
public String forcedGlossaryContentType()
The content type of forcedGlossary. Values for this parameter can be obtained from the HttpMediaType class.
public InputStream 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}`.*.
public String parallelCorpusContentType()
The content type of parallelCorpus. Values for this parameter can be obtained from the HttpMediaType class.
public String 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.
Copyright © 2024 IBM Cloud. All rights reserved.