Class NlpRobertaTokenizationConfig.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<NlpRobertaTokenizationConfig.Builder>
co.elastic.clients.elasticsearch.ml.NlpRobertaTokenizationConfig.Builder
- All Implemented Interfaces:
WithJson<NlpRobertaTokenizationConfig.Builder>,ObjectBuilder<NlpRobertaTokenizationConfig>
- Enclosing class:
- NlpRobertaTokenizationConfig
public static class NlpRobertaTokenizationConfig.Builder extends WithJsonObjectBuilderBase<NlpRobertaTokenizationConfig.Builder> implements ObjectBuilder<NlpRobertaTokenizationConfig>
Builder for
NlpRobertaTokenizationConfig.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description NlpRobertaTokenizationConfig.BuilderaddPrefixSpace(java.lang.Boolean value)Should the tokenizer prefix input with a space characterNlpRobertaTokenizationConfigbuild()Builds aNlpRobertaTokenizationConfig.NlpRobertaTokenizationConfig.BuildermaxSequenceLength(java.lang.Integer value)Maximum input sequence length for the modelprotected NlpRobertaTokenizationConfig.Builderself()NlpRobertaTokenizationConfig.Builderspan(java.lang.Integer value)Tokenization spanning options.NlpRobertaTokenizationConfig.Buildertruncate(TokenizationTruncate value)Should tokenization input be automatically truncated before sending to the model for inferenceNlpRobertaTokenizationConfig.BuilderwithSpecialTokens(java.lang.Boolean value)Is tokenization completed with special tokensMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addPrefixSpace
public final NlpRobertaTokenizationConfig.Builder addPrefixSpace(@Nullable java.lang.Boolean value)Should the tokenizer prefix input with a space characterAPI name:
add_prefix_space -
withSpecialTokens
public final NlpRobertaTokenizationConfig.Builder withSpecialTokens(@Nullable java.lang.Boolean value)Is tokenization completed with special tokensAPI name:
with_special_tokens -
maxSequenceLength
public final NlpRobertaTokenizationConfig.Builder maxSequenceLength(@Nullable java.lang.Integer value)Maximum input sequence length for the modelAPI name:
max_sequence_length -
truncate
Should tokenization input be automatically truncated before sending to the model for inferenceAPI name:
truncate -
span
Tokenization spanning options. Special value of -1 indicates no spanning takes placeAPI name:
span -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<NlpRobertaTokenizationConfig.Builder>
-
build
Builds aNlpRobertaTokenizationConfig.- Specified by:
buildin interfaceObjectBuilder<NlpRobertaTokenizationConfig>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-