Class NlpBertTokenizationConfig.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<NlpBertTokenizationConfig.Builder>
co.elastic.clients.elasticsearch.ml.NlpBertTokenizationConfig.Builder
- All Implemented Interfaces:
WithJson<NlpBertTokenizationConfig.Builder>,ObjectBuilder<NlpBertTokenizationConfig>
- Enclosing class:
- NlpBertTokenizationConfig
public static class NlpBertTokenizationConfig.Builder extends WithJsonObjectBuilderBase<NlpBertTokenizationConfig.Builder> implements ObjectBuilder<NlpBertTokenizationConfig>
Builder for
NlpBertTokenizationConfig.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description NlpBertTokenizationConfigbuild()Builds aNlpBertTokenizationConfig.NlpBertTokenizationConfig.BuilderdoLowerCase(java.lang.Boolean value)Should the tokenizer lower case the textNlpBertTokenizationConfig.BuildermaxSequenceLength(java.lang.Integer value)Maximum input sequence length for the modelprotected NlpBertTokenizationConfig.Builderself()NlpBertTokenizationConfig.Builderspan(java.lang.Integer value)Tokenization spanning options.NlpBertTokenizationConfig.Buildertruncate(TokenizationTruncate value)Should tokenization input be automatically truncated before sending to the model for inferenceNlpBertTokenizationConfig.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
-
doLowerCase
Should the tokenizer lower case the textAPI name:
do_lower_case -
withSpecialTokens
public final NlpBertTokenizationConfig.Builder withSpecialTokens(@Nullable java.lang.Boolean value)Is tokenization completed with special tokensAPI name:
with_special_tokens -
maxSequenceLength
public final NlpBertTokenizationConfig.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<NlpBertTokenizationConfig.Builder>
-
build
Builds aNlpBertTokenizationConfig.- Specified by:
buildin interfaceObjectBuilder<NlpBertTokenizationConfig>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-