Class CommonTokenizationConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.CommonTokenizationConfig
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
NlpBertTokenizationConfig
,NlpRobertaTokenizationConfig
,XlmRobertaTokenizationConfig
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CommonTokenizationConfig.AbstractBuilder<BuilderT extends CommonTokenizationConfig.AbstractBuilder<BuilderT>>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Should the tokenizer lower case the textfinal Integer
Maximum input sequence length for the modelvoid
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <BuilderT extends CommonTokenizationConfig.AbstractBuilder<BuilderT>>
voidsetupCommonTokenizationConfigDeserializer
(ObjectDeserializer<BuilderT> op) final Integer
span()
Tokenization spanning options.toString()
final TokenizationTruncate
truncate()
Should tokenization input be automatically truncated before sending to the model for inferencefinal Boolean
Is tokenization completed with special tokens
-
Constructor Details
-
CommonTokenizationConfig
-
-
Method Details
-
doLowerCase
Should the tokenizer lower case the textAPI name:
do_lower_case
-
maxSequenceLength
Maximum input sequence length for the modelAPI name:
max_sequence_length
-
span
Tokenization spanning options. Special value of -1 indicates no spanning takes placeAPI name:
span
-
truncate
Should tokenization input be automatically truncated before sending to the model for inferenceAPI name:
truncate
-
withSpecialTokens
Is tokenization completed with special tokensAPI name:
with_special_tokens
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCommonTokenizationConfigDeserializer
protected static <BuilderT extends CommonTokenizationConfig.AbstractBuilder<BuilderT>> void setupCommonTokenizationConfigDeserializer(ObjectDeserializer<BuilderT> op)
-