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 NlpBertTokenizationConfig
build()
Builds aNlpBertTokenizationConfig
.NlpBertTokenizationConfig.Builder
doLowerCase(java.lang.Boolean value)
Should the tokenizer lower case the textNlpBertTokenizationConfig.Builder
maxSequenceLength(java.lang.Integer value)
Maximum input sequence length for the modelprotected NlpBertTokenizationConfig.Builder
self()
NlpBertTokenizationConfig.Builder
span(java.lang.Integer value)
Tokenization spanning options.NlpBertTokenizationConfig.Builder
truncate(TokenizationTruncate value)
Should tokenization input be automatically truncated before sending to the model for inferenceNlpBertTokenizationConfig.Builder
withSpecialTokens(java.lang.Boolean value)
Is tokenization completed with special tokensMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods 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:
self
in classWithJsonObjectBuilderBase<NlpBertTokenizationConfig.Builder>
-
build
Builds aNlpBertTokenizationConfig
.- Specified by:
build
in interfaceObjectBuilder<NlpBertTokenizationConfig>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-