Class: Google::Cloud::Language::V1beta2::AnnotateTextRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/language/v1beta2/language_service.rb

Overview

The request message for the text annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call.

Defined Under Namespace

Classes: Features

Instance Attribute Summary collapse

Instance Attribute Details

#document::Google::Cloud::Language::V1beta2::Document

Returns Required. Input document.

Returns:



1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 1139

class AnnotateTextRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # All available features for sentiment, syntax, and semantic analysis.
  # Setting each one to true will enable that specific analysis for the input.
  # Next ID: 12
  # @!attribute [rw] extract_syntax
  #   @return [::Boolean]
  #     Extract syntax information.
  # @!attribute [rw] extract_entities
  #   @return [::Boolean]
  #     Extract entities.
  # @!attribute [rw] extract_document_sentiment
  #   @return [::Boolean]
  #     Extract document-level sentiment.
  # @!attribute [rw] extract_entity_sentiment
  #   @return [::Boolean]
  #     Extract entities and their associated sentiment.
  # @!attribute [rw] classify_text
  #   @return [::Boolean]
  #     Classify the full document into categories. If this is true,
  #     the API will use the default model which classifies into a
  #     [predefined
  #     taxonomy](https://cloud.google.com/natural-language/docs/categories).
  # @!attribute [rw] moderate_text
  #   @return [::Boolean]
  #     Moderate the document for harmful and sensitive categories.
  # @!attribute [rw] classification_model_options
  #   @return [::Google::Cloud::Language::V1beta2::ClassificationModelOptions]
  #     The model options to use for classification. Defaults to v1 options
  #     if not specified. Only used if `classify_text` is set to true.
  class Features
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#encoding_type::Google::Cloud::Language::V1beta2::EncodingType

Returns The encoding type used by the API to calculate offsets.

Returns:



1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 1139

class AnnotateTextRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # All available features for sentiment, syntax, and semantic analysis.
  # Setting each one to true will enable that specific analysis for the input.
  # Next ID: 12
  # @!attribute [rw] extract_syntax
  #   @return [::Boolean]
  #     Extract syntax information.
  # @!attribute [rw] extract_entities
  #   @return [::Boolean]
  #     Extract entities.
  # @!attribute [rw] extract_document_sentiment
  #   @return [::Boolean]
  #     Extract document-level sentiment.
  # @!attribute [rw] extract_entity_sentiment
  #   @return [::Boolean]
  #     Extract entities and their associated sentiment.
  # @!attribute [rw] classify_text
  #   @return [::Boolean]
  #     Classify the full document into categories. If this is true,
  #     the API will use the default model which classifies into a
  #     [predefined
  #     taxonomy](https://cloud.google.com/natural-language/docs/categories).
  # @!attribute [rw] moderate_text
  #   @return [::Boolean]
  #     Moderate the document for harmful and sensitive categories.
  # @!attribute [rw] classification_model_options
  #   @return [::Google::Cloud::Language::V1beta2::ClassificationModelOptions]
  #     The model options to use for classification. Defaults to v1 options
  #     if not specified. Only used if `classify_text` is set to true.
  class Features
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#features::Google::Cloud::Language::V1beta2::AnnotateTextRequest::Features

Returns Required. The enabled features.

Returns:



1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 1139

class AnnotateTextRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # All available features for sentiment, syntax, and semantic analysis.
  # Setting each one to true will enable that specific analysis for the input.
  # Next ID: 12
  # @!attribute [rw] extract_syntax
  #   @return [::Boolean]
  #     Extract syntax information.
  # @!attribute [rw] extract_entities
  #   @return [::Boolean]
  #     Extract entities.
  # @!attribute [rw] extract_document_sentiment
  #   @return [::Boolean]
  #     Extract document-level sentiment.
  # @!attribute [rw] extract_entity_sentiment
  #   @return [::Boolean]
  #     Extract entities and their associated sentiment.
  # @!attribute [rw] classify_text
  #   @return [::Boolean]
  #     Classify the full document into categories. If this is true,
  #     the API will use the default model which classifies into a
  #     [predefined
  #     taxonomy](https://cloud.google.com/natural-language/docs/categories).
  # @!attribute [rw] moderate_text
  #   @return [::Boolean]
  #     Moderate the document for harmful and sensitive categories.
  # @!attribute [rw] classification_model_options
  #   @return [::Google::Cloud::Language::V1beta2::ClassificationModelOptions]
  #     The model options to use for classification. Defaults to v1 options
  #     if not specified. Only used if `classify_text` is set to true.
  class Features
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end