Class NlpBertTokenizationConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.NlpBertTokenizationConfig
- All Implemented Interfaces:
TokenizationConfigVariant,JsonpSerializable
@JsonpDeserializable
public class NlpBertTokenizationConfig
extends Object
implements TokenizationConfigVariant, JsonpSerializable
BERT and MPNet tokenization configuration options
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<NlpBertTokenizationConfig>Json deserializer forNlpBertTokenizationConfig -
Method Summary
Modifier and TypeMethodDescriptionTokenizationConfig variant kind.final BooleanShould the tokenizer lower case the textfinal IntegerMaximum input sequence length for the modelstatic NlpBertTokenizationConfigvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupNlpBertTokenizationConfigDeserializer(ObjectDeserializer<NlpBertTokenizationConfig.Builder> op) final Integerspan()Tokenization spanning options.toString()final TokenizationTruncatetruncate()Should tokenization input be automatically truncated before sending to the model for inferencefinal BooleanIs tokenization completed with special tokensMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch.ml.TokenizationConfigVariant
_toTokenizationConfig
-
Field Details
-
_DESERIALIZER
Json deserializer forNlpBertTokenizationConfig
-
-
Method Details
-
of
public static NlpBertTokenizationConfig of(Function<NlpBertTokenizationConfig.Builder, ObjectBuilder<NlpBertTokenizationConfig>> fn) -
_tokenizationConfigKind
TokenizationConfig variant kind.- Specified by:
_tokenizationConfigKindin interfaceTokenizationConfigVariant
-
doLowerCase
Should the tokenizer lower case the textAPI name:
do_lower_case -
withSpecialTokens
Is tokenization completed with special tokensAPI name:
with_special_tokens -
maxSequenceLength
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupNlpBertTokenizationConfigDeserializer
protected static void setupNlpBertTokenizationConfigDeserializer(ObjectDeserializer<NlpBertTokenizationConfig.Builder> op)
-