public abstract static class QATranslator.BaseBuilder<T extends QATranslator.BaseBuilder>
extends java.lang.Object
| Constructor and Description |
|---|
BaseBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(java.util.Map<java.lang.String,?> arguments)
Configures the builder with the model arguments.
|
T |
optBatchifier(Batchifier batchifier)
Sets the
Batchifier for the Translator. |
T |
optIncludeTokenTypes(boolean includeTokenTypes)
Sets the if include token types for the
Translator. |
T |
optLocale(java.lang.String locale)
Sets the name of the locale for the
Translator. |
T |
optMaxLabels(int maxLabels)
Sets the max number of labels for the
Translator. |
T |
optMaxLength(int maxLength)
Sets the max number of tokens for the
Translator. |
T |
optPadding(boolean padding)
Sets the if pad the tokens for the
Translator. |
T |
optTokenizer(java.lang.String tokenizer)
Sets the name of the tokenizer for the
Translator. |
T |
optToLowerCase(boolean toLowerCase)
Sets the if convert text to lower case for the
Translator. |
T |
optTruncation(boolean truncation)
Sets the if truncate the tokens for the
Translator. |
T |
optVocab(java.lang.String vocab)
Sets the name of the vocabulary file for the
Translator. |
protected abstract T |
self() |
public T optBatchifier(Batchifier batchifier)
Batchifier for the Translator.batchifier - the Batchifier to be setpublic T optTokenizer(java.lang.String tokenizer)
Translator.tokenizer - the name of the tokenizerpublic T optVocab(java.lang.String vocab)
Translator.vocab - name of the vocabulary filepublic T optLocale(java.lang.String locale)
Translator.locale - the name of the localepublic T optToLowerCase(boolean toLowerCase)
Translator.toLowerCase - if convert text to lower casepublic T optIncludeTokenTypes(boolean includeTokenTypes)
Translator.includeTokenTypes - if include token typespublic T optPadding(boolean padding)
Translator.padding - if pad the tokenspublic T optTruncation(boolean truncation)
Translator.truncation - if truncate the tokenspublic T optMaxLength(int maxLength)
Translator.maxLength - the max number of tokenspublic T optMaxLabels(int maxLabels)
Translator.maxLabels - the max number of labelspublic void configure(java.util.Map<java.lang.String,?> arguments)
arguments - the model argumentsprotected abstract T self()