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 | Field and Description |
---|---|
protected java.lang.String |
baseModelId |
protected java.io.InputStream |
forcedGlossary |
protected java.lang.String |
name |
protected java.io.InputStream |
parallelCorpus |
Modifier | Constructor and Description |
---|---|
protected |
CreateModelOptions(CreateModelOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
baseModelId()
Gets the baseModelId.
|
java.io.InputStream |
forcedGlossary()
Gets the forcedGlossary.
|
java.lang.String |
name()
Gets the name.
|
CreateModelOptions.Builder |
newBuilder()
New builder.
|
java.io.InputStream |
parallelCorpus()
Gets the parallelCorpus.
|
protected java.lang.String baseModelId
protected java.io.InputStream forcedGlossary
protected java.io.InputStream parallelCorpus
protected java.lang.String name
protected CreateModelOptions(CreateModelOptions.Builder builder)
public CreateModelOptions.Builder newBuilder()
public java.lang.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 java.io.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 java.io.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 java.lang.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.