Class NlpConfig.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, NlpConfigOrBuilder, java.lang.Cloneable
    Enclosing class:
    NlpConfig

    public static final class NlpConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
    implements NlpConfigOrBuilder
     Common message for configuring spacy.
     
    Protobuf type arg_services.nlp.v1.NlpConfig
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
      • clear

        public NlpConfig.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
      • getDefaultInstanceForType

        public NlpConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public NlpConfig build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public NlpConfig buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • mergeFrom

        public NlpConfig.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NlpConfig.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
      • mergeFrom

        public NlpConfig.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NlpConfig.Builder>
        Throws:
        java.io.IOException
      • getLanguage

        public java.lang.String getLanguage()
         Any language supported by spacy (e.g., `en`).
         [Reference](https://spacy.io/usage/models#languages).
         
        string language = 1 [json_name = "language"];
        Specified by:
        getLanguage in interface NlpConfigOrBuilder
        Returns:
        The language.
      • getLanguageBytes

        public com.google.protobuf.ByteString getLanguageBytes()
         Any language supported by spacy (e.g., `en`).
         [Reference](https://spacy.io/usage/models#languages).
         
        string language = 1 [json_name = "language"];
        Specified by:
        getLanguageBytes in interface NlpConfigOrBuilder
        Returns:
        The bytes for language.
      • setLanguage

        public NlpConfig.Builder setLanguage​(java.lang.String value)
         Any language supported by spacy (e.g., `en`).
         [Reference](https://spacy.io/usage/models#languages).
         
        string language = 1 [json_name = "language"];
        Parameters:
        value - The language to set.
        Returns:
        This builder for chaining.
      • clearLanguage

        public NlpConfig.Builder clearLanguage()
         Any language supported by spacy (e.g., `en`).
         [Reference](https://spacy.io/usage/models#languages).
         
        string language = 1 [json_name = "language"];
        Returns:
        This builder for chaining.
      • setLanguageBytes

        public NlpConfig.Builder setLanguageBytes​(com.google.protobuf.ByteString value)
         Any language supported by spacy (e.g., `en`).
         [Reference](https://spacy.io/usage/models#languages).
         
        string language = 1 [json_name = "language"];
        Parameters:
        value - The bytes for language to set.
        Returns:
        This builder for chaining.
      • getSpacyModel

        public java.lang.String getSpacyModel()
         Name of the trained spacy pipeline (e.g., `en_core_web_lg`).
         If empty, a blank spacy model will be used (e.g., if you only need embeddings and provide custom `embedding_models`.
         [Example: English models](https://spacy.io/models/en).
         
        string spacy_model = 2 [json_name = "spacyModel"];
        Specified by:
        getSpacyModel in interface NlpConfigOrBuilder
        Returns:
        The spacyModel.
      • getSpacyModelBytes

        public com.google.protobuf.ByteString getSpacyModelBytes()
         Name of the trained spacy pipeline (e.g., `en_core_web_lg`).
         If empty, a blank spacy model will be used (e.g., if you only need embeddings and provide custom `embedding_models`.
         [Example: English models](https://spacy.io/models/en).
         
        string spacy_model = 2 [json_name = "spacyModel"];
        Specified by:
        getSpacyModelBytes in interface NlpConfigOrBuilder
        Returns:
        The bytes for spacyModel.
      • setSpacyModel

        public NlpConfig.Builder setSpacyModel​(java.lang.String value)
         Name of the trained spacy pipeline (e.g., `en_core_web_lg`).
         If empty, a blank spacy model will be used (e.g., if you only need embeddings and provide custom `embedding_models`.
         [Example: English models](https://spacy.io/models/en).
         
        string spacy_model = 2 [json_name = "spacyModel"];
        Parameters:
        value - The spacyModel to set.
        Returns:
        This builder for chaining.
      • clearSpacyModel

        public NlpConfig.Builder clearSpacyModel()
         Name of the trained spacy pipeline (e.g., `en_core_web_lg`).
         If empty, a blank spacy model will be used (e.g., if you only need embeddings and provide custom `embedding_models`.
         [Example: English models](https://spacy.io/models/en).
         
        string spacy_model = 2 [json_name = "spacyModel"];
        Returns:
        This builder for chaining.
      • setSpacyModelBytes

        public NlpConfig.Builder setSpacyModelBytes​(com.google.protobuf.ByteString value)
         Name of the trained spacy pipeline (e.g., `en_core_web_lg`).
         If empty, a blank spacy model will be used (e.g., if you only need embeddings and provide custom `embedding_models`.
         [Example: English models](https://spacy.io/models/en).
         
        string spacy_model = 2 [json_name = "spacyModel"];
        Parameters:
        value - The bytes for spacyModel to set.
        Returns:
        This builder for chaining.
      • getEmbeddingModelsList

        public java.util.List<EmbeddingModel> getEmbeddingModelsList()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
        Specified by:
        getEmbeddingModelsList in interface NlpConfigOrBuilder
      • getEmbeddingModelsCount

        public int getEmbeddingModelsCount()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
        Specified by:
        getEmbeddingModelsCount in interface NlpConfigOrBuilder
      • getEmbeddingModels

        public EmbeddingModel getEmbeddingModels​(int index)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
        Specified by:
        getEmbeddingModels in interface NlpConfigOrBuilder
      • setEmbeddingModels

        public NlpConfig.Builder setEmbeddingModels​(int index,
                                                    EmbeddingModel value)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • setEmbeddingModels

        public NlpConfig.Builder setEmbeddingModels​(int index,
                                                    EmbeddingModel.Builder builderForValue)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addEmbeddingModels

        public NlpConfig.Builder addEmbeddingModels​(EmbeddingModel value)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addEmbeddingModels

        public NlpConfig.Builder addEmbeddingModels​(int index,
                                                    EmbeddingModel value)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addEmbeddingModels

        public NlpConfig.Builder addEmbeddingModels​(EmbeddingModel.Builder builderForValue)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addEmbeddingModels

        public NlpConfig.Builder addEmbeddingModels​(int index,
                                                    EmbeddingModel.Builder builderForValue)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addAllEmbeddingModels

        public NlpConfig.Builder addAllEmbeddingModels​(java.lang.Iterable<? extends EmbeddingModel> values)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • clearEmbeddingModels

        public NlpConfig.Builder clearEmbeddingModels()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • removeEmbeddingModels

        public NlpConfig.Builder removeEmbeddingModels​(int index)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • getEmbeddingModelsBuilder

        public EmbeddingModel.Builder getEmbeddingModelsBuilder​(int index)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • getEmbeddingModelsOrBuilder

        public EmbeddingModelOrBuilder getEmbeddingModelsOrBuilder​(int index)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
        Specified by:
        getEmbeddingModelsOrBuilder in interface NlpConfigOrBuilder
      • getEmbeddingModelsOrBuilderList

        public java.util.List<? extends EmbeddingModelOrBuilder> getEmbeddingModelsOrBuilderList()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
        Specified by:
        getEmbeddingModelsOrBuilderList in interface NlpConfigOrBuilder
      • addEmbeddingModelsBuilder

        public EmbeddingModel.Builder addEmbeddingModelsBuilder()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • addEmbeddingModelsBuilder

        public EmbeddingModel.Builder addEmbeddingModelsBuilder​(int index)
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • getEmbeddingModelsBuilderList

        public java.util.List<EmbeddingModel.Builder> getEmbeddingModelsBuilderList()
         List of embeddings to use for computing word/sentence vectors.
         If given, these embeddings will **override** the embeddings of the specified `spacy_model`.
         Multiple models are concatenated to each other, increasing the length of the resulting vector.
         
        repeated .arg_services.nlp.v1.EmbeddingModel embedding_models = 3 [json_name = "embeddingModels"];
      • getSimilarityMethodValue

        public int getSimilarityMethodValue()
         Mathematical function to determine a similarity score given two strings.
         
        .arg_services.nlp.v1.SimilarityMethod similarity_method = 4 [json_name = "similarityMethod"];
        Specified by:
        getSimilarityMethodValue in interface NlpConfigOrBuilder
        Returns:
        The enum numeric value on the wire for similarityMethod.
      • setSimilarityMethodValue

        public NlpConfig.Builder setSimilarityMethodValue​(int value)
         Mathematical function to determine a similarity score given two strings.
         
        .arg_services.nlp.v1.SimilarityMethod similarity_method = 4 [json_name = "similarityMethod"];
        Parameters:
        value - The enum numeric value on the wire for similarityMethod to set.
        Returns:
        This builder for chaining.
      • getSimilarityMethod

        public SimilarityMethod getSimilarityMethod()
         Mathematical function to determine a similarity score given two strings.
         
        .arg_services.nlp.v1.SimilarityMethod similarity_method = 4 [json_name = "similarityMethod"];
        Specified by:
        getSimilarityMethod in interface NlpConfigOrBuilder
        Returns:
        The similarityMethod.
      • setSimilarityMethod

        public NlpConfig.Builder setSimilarityMethod​(SimilarityMethod value)
         Mathematical function to determine a similarity score given two strings.
         
        .arg_services.nlp.v1.SimilarityMethod similarity_method = 4 [json_name = "similarityMethod"];
        Parameters:
        value - The similarityMethod to set.
        Returns:
        This builder for chaining.
      • clearSimilarityMethod

        public NlpConfig.Builder clearSimilarityMethod()
         Mathematical function to determine a similarity score given two strings.
         
        .arg_services.nlp.v1.SimilarityMethod similarity_method = 4 [json_name = "similarityMethod"];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final NlpConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>
      • mergeUnknownFields

        public final NlpConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NlpConfig.Builder>