Class NlpRobertaTokenizationConfig

java.lang.Object
co.elastic.clients.elasticsearch.ml.NlpRobertaTokenizationConfig
All Implemented Interfaces:
TokenizationConfigVariant, JsonpSerializable

@JsonpDeserializable
public class NlpRobertaTokenizationConfig
extends java.lang.Object
implements TokenizationConfigVariant, JsonpSerializable
RoBERTa tokenization configuration options
See Also:
API specification
  • Field Details

  • Method Details

    • of

    • _tokenizationConfigKind

      public TokenizationConfig.Kind _tokenizationConfigKind()
      TokenizationConfig variant kind.
      Specified by:
      _tokenizationConfigKind in interface TokenizationConfigVariant
    • addPrefixSpace

      @Nullable public final java.lang.Boolean addPrefixSpace()
      Should the tokenizer prefix input with a space character

      API name: add_prefix_space

    • withSpecialTokens

      @Nullable public final java.lang.Boolean withSpecialTokens()
      Is tokenization completed with special tokens

      API name: with_special_tokens

    • maxSequenceLength

      @Nullable public final java.lang.Integer maxSequenceLength()
      Maximum input sequence length for the model

      API name: max_sequence_length

    • truncate

      @Nullable public final TokenizationTruncate truncate()
      Should tokenization input be automatically truncated before sending to the model for inference

      API name: truncate

    • span

      @Nullable public final java.lang.Integer span()
      Tokenization spanning options. Special value of -1 indicates no spanning takes place

      API name: span

    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setupNlpRobertaTokenizationConfigDeserializer

      protected static void setupNlpRobertaTokenizationConfigDeserializer​(ObjectDeserializer<NlpRobertaTokenizationConfig.Builder> op)