Class NlpBertTokenizationConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.NlpBertTokenizationConfig
- All Implemented Interfaces:
TokenizationConfigVariant
,JsonpSerializable
@JsonpDeserializable public class NlpBertTokenizationConfig extends java.lang.Object implements TokenizationConfigVariant, JsonpSerializable
BERT and MPNet tokenization configuration options
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NlpBertTokenizationConfig.Builder
Builder forNlpBertTokenizationConfig
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<NlpBertTokenizationConfig>
_DESERIALIZER
Json deserializer forNlpBertTokenizationConfig
-
Method Summary
Modifier and Type Method Description TokenizationConfig.Kind
_tokenizationConfigKind()
TokenizationConfig variant kind.java.lang.Boolean
doLowerCase()
Should the tokenizer lower case the textjava.lang.Integer
maxSequenceLength()
Maximum input sequence length for the modelstatic NlpBertTokenizationConfig
of(java.util.function.Function<NlpBertTokenizationConfig.Builder,ObjectBuilder<NlpBertTokenizationConfig>> fn)
void
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 void
setupNlpBertTokenizationConfigDeserializer(ObjectDeserializer<NlpBertTokenizationConfig.Builder> op)
java.lang.Integer
span()
Tokenization spanning options.java.lang.String
toString()
TokenizationTruncate
truncate()
Should tokenization input be automatically truncated before sending to the model for inferencejava.lang.Boolean
withSpecialTokens()
Is tokenization completed with special tokensMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch.ml.TokenizationConfigVariant
_toTokenizationConfig
-
Field Details
-
_DESERIALIZER
Json deserializer forNlpBertTokenizationConfig
-
-
Method Details
-
of
public static NlpBertTokenizationConfig of(java.util.function.Function<NlpBertTokenizationConfig.Builder,ObjectBuilder<NlpBertTokenizationConfig>> fn) -
_tokenizationConfigKind
TokenizationConfig variant kind.- Specified by:
_tokenizationConfigKind
in interfaceTokenizationConfigVariant
-
doLowerCase
@Nullable public final java.lang.Boolean doLowerCase()Should the tokenizer lower case the textAPI name:
do_lower_case
-
withSpecialTokens
@Nullable public final java.lang.Boolean withSpecialTokens()Is tokenization completed with special tokensAPI name:
with_special_tokens
-
maxSequenceLength
@Nullable public final java.lang.Integer 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
@Nullable public final java.lang.Integer span()Tokenization spanning options. Special value of -1 indicates no spanning takes placeAPI name:
span
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupNlpBertTokenizationConfigDeserializer
protected static void setupNlpBertTokenizationConfigDeserializer(ObjectDeserializer<NlpBertTokenizationConfig.Builder> op)
-