google-cloud-language-v1 0.1.3 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +5 -1
- data/lib/google/cloud/language/v1.rb +1 -1
- data/lib/google/cloud/language/v1/language_service.rb +1 -1
- data/lib/google/cloud/language/v1/language_service/client.rb +148 -143
- data/lib/google/cloud/language/v1/language_service/credentials.rb +1 -1
- data/lib/google/cloud/language/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/language/v1/language_service.rb +136 -136
- metadata +33 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V1
|
25
25
|
module LanguageService
|
26
26
|
# Credentials for the LanguageService API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-language",
|
30
30
|
"https://www.googleapis.com/auth/cloud-platform"
|
@@ -128,7 +128,7 @@ module Google
|
|
128
128
|
# - pattern: "shelves/{shelf}"
|
129
129
|
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
130
|
# @!attribute [rw] type
|
131
|
-
# @return [String]
|
131
|
+
# @return [::String]
|
132
132
|
# The resource type. It must be in the format of
|
133
133
|
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
134
|
# singular and must not include version numbers.
|
@@ -140,7 +140,7 @@ module Google
|
|
140
140
|
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
141
|
# characters allowed for the `resource_type_kind` is 100.
|
142
142
|
# @!attribute [rw] pattern
|
143
|
-
# @return [Array
|
143
|
+
# @return [::Array<::String>]
|
144
144
|
# Optional. The relative resource name pattern associated with this resource
|
145
145
|
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
146
|
#
|
@@ -161,11 +161,11 @@ module Google
|
|
161
161
|
# the same component name (e.g. "project") refers to IDs of the same
|
162
162
|
# type of resource.
|
163
163
|
# @!attribute [rw] name_field
|
164
|
-
# @return [String]
|
164
|
+
# @return [::String]
|
165
165
|
# Optional. The field on the resource that designates the resource name
|
166
166
|
# field. If omitted, this is assumed to be "name".
|
167
167
|
# @!attribute [rw] history
|
168
|
-
# @return [Google::Api::ResourceDescriptor::History]
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
169
|
# Optional. The historical or future-looking state of the resource pattern.
|
170
170
|
#
|
171
171
|
# Example:
|
@@ -182,19 +182,19 @@ module Google
|
|
182
182
|
# };
|
183
183
|
# }
|
184
184
|
# @!attribute [rw] plural
|
185
|
-
# @return [String]
|
185
|
+
# @return [::String]
|
186
186
|
# The plural name used in the resource name, such as 'projects' for
|
187
187
|
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
188
|
# field in k8s CRD spec
|
189
189
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
190
|
# @!attribute [rw] singular
|
191
|
-
# @return [String]
|
191
|
+
# @return [::String]
|
192
192
|
# The same concept of the `singular` field in k8s CRD spec
|
193
193
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
194
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
195
|
class ResourceDescriptor
|
196
|
-
include Google::Protobuf::MessageExts
|
197
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
196
|
+
include ::Google::Protobuf::MessageExts
|
197
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
198
198
|
|
199
199
|
# A description of the historical or future-looking state of the
|
200
200
|
# resource pattern.
|
@@ -216,7 +216,7 @@ module Google
|
|
216
216
|
# Defines a proto annotation that describes a string field that refers to
|
217
217
|
# an API resource.
|
218
218
|
# @!attribute [rw] type
|
219
|
-
# @return [String]
|
219
|
+
# @return [::String]
|
220
220
|
# The resource type that the annotated field references.
|
221
221
|
#
|
222
222
|
# Example:
|
@@ -227,7 +227,7 @@ module Google
|
|
227
227
|
# }];
|
228
228
|
# }
|
229
229
|
# @!attribute [rw] child_type
|
230
|
-
# @return [String]
|
230
|
+
# @return [::String]
|
231
231
|
# The resource type of a child collection that the annotated field
|
232
232
|
# references. This is useful for annotating the `parent` field that
|
233
233
|
# doesn't have a fixed resource type.
|
@@ -240,8 +240,8 @@ module Google
|
|
240
240
|
# };
|
241
241
|
# }
|
242
242
|
class ResourceReference
|
243
|
-
include Google::Protobuf::MessageExts
|
244
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
245
|
end
|
246
246
|
end
|
247
247
|
end
|
@@ -25,21 +25,21 @@ module Google
|
|
25
25
|
#
|
26
26
|
# Represents the input to API methods.
|
27
27
|
# @!attribute [rw] type
|
28
|
-
# @return [Google::Cloud::Language::V1::Document::Type]
|
28
|
+
# @return [::Google::Cloud::Language::V1::Document::Type]
|
29
29
|
# Required. If the type is not set or is `TYPE_UNSPECIFIED`,
|
30
30
|
# returns an `INVALID_ARGUMENT` error.
|
31
31
|
# @!attribute [rw] content
|
32
|
-
# @return [String]
|
32
|
+
# @return [::String]
|
33
33
|
# The content of the input in string format.
|
34
34
|
# Cloud audit logging exempt since it is based on user data.
|
35
35
|
# @!attribute [rw] gcs_content_uri
|
36
|
-
# @return [String]
|
36
|
+
# @return [::String]
|
37
37
|
# The Google Cloud Storage URI where the file content is located.
|
38
38
|
# This URI must be of the form: gs://bucket_name/object_name. For more
|
39
39
|
# details, see https://cloud.google.com/storage/docs/reference-uris.
|
40
40
|
# NOTE: Cloud Storage object versioning is not supported.
|
41
41
|
# @!attribute [rw] language
|
42
|
-
# @return [String]
|
42
|
+
# @return [::String]
|
43
43
|
# The language of the document (if not specified, the language is
|
44
44
|
# automatically detected). Both ISO and BCP-47 language codes are
|
45
45
|
# accepted.<br>
|
@@ -49,8 +49,8 @@ module Google
|
|
49
49
|
# specified by the caller or automatically detected) is not supported by the
|
50
50
|
# called API method, an `INVALID_ARGUMENT` error is returned.
|
51
51
|
class Document
|
52
|
-
include Google::Protobuf::MessageExts
|
53
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
52
|
+
include ::Google::Protobuf::MessageExts
|
53
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
54
54
|
|
55
55
|
# The document types enum.
|
56
56
|
module Type
|
@@ -67,36 +67,36 @@ module Google
|
|
67
67
|
|
68
68
|
# Represents a sentence in the input document.
|
69
69
|
# @!attribute [rw] text
|
70
|
-
# @return [Google::Cloud::Language::V1::TextSpan]
|
70
|
+
# @return [::Google::Cloud::Language::V1::TextSpan]
|
71
71
|
# The sentence text.
|
72
72
|
# @!attribute [rw] sentiment
|
73
|
-
# @return [Google::Cloud::Language::V1::Sentiment]
|
73
|
+
# @return [::Google::Cloud::Language::V1::Sentiment]
|
74
74
|
# For calls to [AnalyzeSentiment][] or if
|
75
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_document_sentiment AnnotateTextRequest.Features.extract_document_sentiment} is set to
|
75
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_document_sentiment AnnotateTextRequest.Features.extract_document_sentiment} is set to
|
76
76
|
# true, this field will contain the sentiment for the sentence.
|
77
77
|
class Sentence
|
78
|
-
include Google::Protobuf::MessageExts
|
79
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
80
|
end
|
81
81
|
|
82
82
|
# Represents a phrase in the text that is a known entity, such as
|
83
83
|
# a person, an organization, or location. The API associates information, such
|
84
84
|
# as salience and mentions, with entities.
|
85
85
|
# @!attribute [rw] name
|
86
|
-
# @return [String]
|
86
|
+
# @return [::String]
|
87
87
|
# The representative name for the entity.
|
88
88
|
# @!attribute [rw] type
|
89
|
-
# @return [Google::Cloud::Language::V1::Entity::Type]
|
89
|
+
# @return [::Google::Cloud::Language::V1::Entity::Type]
|
90
90
|
# The entity type.
|
91
91
|
# @!attribute [rw] metadata
|
92
|
-
# @return [Google::Protobuf::Map{String => String}]
|
92
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
93
93
|
# Metadata associated with the entity.
|
94
94
|
#
|
95
95
|
# For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`)
|
96
96
|
# and Knowledge Graph MID (`mid`), if they are available. For the metadata
|
97
97
|
# associated with other entity types, see the Type table below.
|
98
98
|
# @!attribute [rw] salience
|
99
|
-
# @return [Float]
|
99
|
+
# @return [::Float]
|
100
100
|
# The salience score associated with the entity in the [0, 1.0] range.
|
101
101
|
#
|
102
102
|
# The salience score for an entity provides information about the
|
@@ -104,26 +104,26 @@ module Google
|
|
104
104
|
# Scores closer to 0 are less salient, while scores closer to 1.0 are highly
|
105
105
|
# salient.
|
106
106
|
# @!attribute [rw] mentions
|
107
|
-
# @return [Array
|
107
|
+
# @return [::Array<::Google::Cloud::Language::V1::EntityMention>]
|
108
108
|
# The mentions of this entity in the input document. The API currently
|
109
109
|
# supports proper noun mentions.
|
110
110
|
# @!attribute [rw] sentiment
|
111
|
-
# @return [Google::Cloud::Language::V1::Sentiment]
|
111
|
+
# @return [::Google::Cloud::Language::V1::Sentiment]
|
112
112
|
# For calls to [AnalyzeEntitySentiment][] or if
|
113
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entity_sentiment AnnotateTextRequest.Features.extract_entity_sentiment} is set to
|
113
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entity_sentiment AnnotateTextRequest.Features.extract_entity_sentiment} is set to
|
114
114
|
# true, this field will contain the aggregate sentiment expressed for this
|
115
115
|
# entity in the provided document.
|
116
116
|
class Entity
|
117
|
-
include Google::Protobuf::MessageExts
|
118
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
119
|
|
120
120
|
# @!attribute [rw] key
|
121
|
-
# @return [String]
|
121
|
+
# @return [::String]
|
122
122
|
# @!attribute [rw] value
|
123
|
-
# @return [String]
|
123
|
+
# @return [::String]
|
124
124
|
class MetadataEntry
|
125
|
-
include Google::Protobuf::MessageExts
|
126
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
include ::Google::Protobuf::MessageExts
|
126
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
127
|
end
|
128
128
|
|
129
129
|
# The type of the entity. For most entity types, the associated metadata is a
|
@@ -199,80 +199,80 @@ module Google
|
|
199
199
|
|
200
200
|
# Represents the smallest syntactic building block of the text.
|
201
201
|
# @!attribute [rw] text
|
202
|
-
# @return [Google::Cloud::Language::V1::TextSpan]
|
202
|
+
# @return [::Google::Cloud::Language::V1::TextSpan]
|
203
203
|
# The token text.
|
204
204
|
# @!attribute [rw] part_of_speech
|
205
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech]
|
205
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech]
|
206
206
|
# Parts of speech tag for this token.
|
207
207
|
# @!attribute [rw] dependency_edge
|
208
|
-
# @return [Google::Cloud::Language::V1::DependencyEdge]
|
208
|
+
# @return [::Google::Cloud::Language::V1::DependencyEdge]
|
209
209
|
# Dependency tree parse for this token.
|
210
210
|
# @!attribute [rw] lemma
|
211
|
-
# @return [String]
|
211
|
+
# @return [::String]
|
212
212
|
# [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
|
213
213
|
class Token
|
214
|
-
include Google::Protobuf::MessageExts
|
215
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
214
|
+
include ::Google::Protobuf::MessageExts
|
215
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
216
216
|
end
|
217
217
|
|
218
218
|
# Represents the feeling associated with the entire text or entities in
|
219
219
|
# the text.
|
220
220
|
# @!attribute [rw] magnitude
|
221
|
-
# @return [Float]
|
221
|
+
# @return [::Float]
|
222
222
|
# A non-negative number in the [0, +inf) range, which represents
|
223
223
|
# the absolute magnitude of sentiment regardless of score (positive or
|
224
224
|
# negative).
|
225
225
|
# @!attribute [rw] score
|
226
|
-
# @return [Float]
|
226
|
+
# @return [::Float]
|
227
227
|
# Sentiment score between -1.0 (negative sentiment) and 1.0
|
228
228
|
# (positive sentiment).
|
229
229
|
class Sentiment
|
230
|
-
include Google::Protobuf::MessageExts
|
231
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
230
|
+
include ::Google::Protobuf::MessageExts
|
231
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
232
232
|
end
|
233
233
|
|
234
234
|
# Represents part of speech information for a token. Parts of speech
|
235
235
|
# are as defined in
|
236
236
|
# http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
|
237
237
|
# @!attribute [rw] tag
|
238
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Tag]
|
238
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Tag]
|
239
239
|
# The part of speech tag.
|
240
240
|
# @!attribute [rw] aspect
|
241
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Aspect]
|
241
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Aspect]
|
242
242
|
# The grammatical aspect.
|
243
243
|
# @!attribute [rw] case
|
244
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Case]
|
244
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Case]
|
245
245
|
# The grammatical case.
|
246
246
|
# @!attribute [rw] form
|
247
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Form]
|
247
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Form]
|
248
248
|
# The grammatical form.
|
249
249
|
# @!attribute [rw] gender
|
250
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Gender]
|
250
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Gender]
|
251
251
|
# The grammatical gender.
|
252
252
|
# @!attribute [rw] mood
|
253
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Mood]
|
253
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Mood]
|
254
254
|
# The grammatical mood.
|
255
255
|
# @!attribute [rw] number
|
256
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Number]
|
256
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Number]
|
257
257
|
# The grammatical number.
|
258
258
|
# @!attribute [rw] person
|
259
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Person]
|
259
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Person]
|
260
260
|
# The grammatical person.
|
261
261
|
# @!attribute [rw] proper
|
262
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Proper]
|
262
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Proper]
|
263
263
|
# The grammatical properness.
|
264
264
|
# @!attribute [rw] reciprocity
|
265
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Reciprocity]
|
265
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Reciprocity]
|
266
266
|
# The grammatical reciprocity.
|
267
267
|
# @!attribute [rw] tense
|
268
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Tense]
|
268
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Tense]
|
269
269
|
# The grammatical tense.
|
270
270
|
# @!attribute [rw] voice
|
271
|
-
# @return [Google::Cloud::Language::V1::PartOfSpeech::Voice]
|
271
|
+
# @return [::Google::Cloud::Language::V1::PartOfSpeech::Voice]
|
272
272
|
# The grammatical voice.
|
273
273
|
class PartOfSpeech
|
274
|
-
include Google::Protobuf::MessageExts
|
275
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
274
|
+
include ::Google::Protobuf::MessageExts
|
275
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
276
276
|
|
277
277
|
# The part of speech tags enum.
|
278
278
|
module Tag
|
@@ -568,18 +568,18 @@ module Google
|
|
568
568
|
# information on dependency labels, see
|
569
569
|
# http://www.aclweb.org/anthology/P13-2017
|
570
570
|
# @!attribute [rw] head_token_index
|
571
|
-
# @return [Integer]
|
571
|
+
# @return [::Integer]
|
572
572
|
# Represents the head of this token in the dependency tree.
|
573
573
|
# This is the index of the token which has an arc going to this token.
|
574
574
|
# The index is the position of the token in the array of tokens returned
|
575
575
|
# by the API method. If this token is a root token, then the
|
576
576
|
# `head_token_index` is its own index.
|
577
577
|
# @!attribute [rw] label
|
578
|
-
# @return [Google::Cloud::Language::V1::DependencyEdge::Label]
|
578
|
+
# @return [::Google::Cloud::Language::V1::DependencyEdge::Label]
|
579
579
|
# The parse label for the token.
|
580
580
|
class DependencyEdge
|
581
|
-
include Google::Protobuf::MessageExts
|
582
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
581
|
+
include ::Google::Protobuf::MessageExts
|
582
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
583
583
|
|
584
584
|
# The parse label enum for the token.
|
585
585
|
module Label
|
@@ -837,20 +837,20 @@ module Google
|
|
837
837
|
# Represents a mention for an entity in the text. Currently, proper noun
|
838
838
|
# mentions are supported.
|
839
839
|
# @!attribute [rw] text
|
840
|
-
# @return [Google::Cloud::Language::V1::TextSpan]
|
840
|
+
# @return [::Google::Cloud::Language::V1::TextSpan]
|
841
841
|
# The mention text.
|
842
842
|
# @!attribute [rw] type
|
843
|
-
# @return [Google::Cloud::Language::V1::EntityMention::Type]
|
843
|
+
# @return [::Google::Cloud::Language::V1::EntityMention::Type]
|
844
844
|
# The type of the entity mention.
|
845
845
|
# @!attribute [rw] sentiment
|
846
|
-
# @return [Google::Cloud::Language::V1::Sentiment]
|
846
|
+
# @return [::Google::Cloud::Language::V1::Sentiment]
|
847
847
|
# For calls to [AnalyzeEntitySentiment][] or if
|
848
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entity_sentiment AnnotateTextRequest.Features.extract_entity_sentiment} is set to
|
848
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entity_sentiment AnnotateTextRequest.Features.extract_entity_sentiment} is set to
|
849
849
|
# true, this field will contain the sentiment expressed for this mention of
|
850
850
|
# the entity in the provided document.
|
851
851
|
class EntityMention
|
852
|
-
include Google::Protobuf::MessageExts
|
853
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
852
|
+
include ::Google::Protobuf::MessageExts
|
853
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
854
854
|
|
855
855
|
# The supported types of mentions.
|
856
856
|
module Type
|
@@ -867,227 +867,227 @@ module Google
|
|
867
867
|
|
868
868
|
# Represents an output piece of text.
|
869
869
|
# @!attribute [rw] content
|
870
|
-
# @return [String]
|
870
|
+
# @return [::String]
|
871
871
|
# The content of the output text.
|
872
872
|
# @!attribute [rw] begin_offset
|
873
|
-
# @return [Integer]
|
873
|
+
# @return [::Integer]
|
874
874
|
# The API calculates the beginning offset of the content in the original
|
875
|
-
# document according to the {Google::Cloud::Language::V1::EncodingType EncodingType} specified in the API request.
|
875
|
+
# document according to the {::Google::Cloud::Language::V1::EncodingType EncodingType} specified in the API request.
|
876
876
|
class TextSpan
|
877
|
-
include Google::Protobuf::MessageExts
|
878
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
877
|
+
include ::Google::Protobuf::MessageExts
|
878
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
879
879
|
end
|
880
880
|
|
881
881
|
# Represents a category returned from the text classifier.
|
882
882
|
# @!attribute [rw] name
|
883
|
-
# @return [String]
|
883
|
+
# @return [::String]
|
884
884
|
# The name of the category representing the document, from the [predefined
|
885
885
|
# taxonomy](https://cloud.google.com/natural-language/docs/categories).
|
886
886
|
# @!attribute [rw] confidence
|
887
|
-
# @return [Float]
|
887
|
+
# @return [::Float]
|
888
888
|
# The classifier's confidence of the category. Number represents how certain
|
889
889
|
# the classifier is that this category represents the given text.
|
890
890
|
class ClassificationCategory
|
891
|
-
include Google::Protobuf::MessageExts
|
892
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
891
|
+
include ::Google::Protobuf::MessageExts
|
892
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
893
893
|
end
|
894
894
|
|
895
895
|
# The sentiment analysis request message.
|
896
896
|
# @!attribute [rw] document
|
897
|
-
# @return [Google::Cloud::Language::V1::Document]
|
897
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
898
898
|
# Input document.
|
899
899
|
# @!attribute [rw] encoding_type
|
900
|
-
# @return [Google::Cloud::Language::V1::EncodingType]
|
900
|
+
# @return [::Google::Cloud::Language::V1::EncodingType]
|
901
901
|
# The encoding type used by the API to calculate sentence offsets.
|
902
902
|
class AnalyzeSentimentRequest
|
903
|
-
include Google::Protobuf::MessageExts
|
904
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
903
|
+
include ::Google::Protobuf::MessageExts
|
904
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
905
905
|
end
|
906
906
|
|
907
907
|
# The sentiment analysis response message.
|
908
908
|
# @!attribute [rw] document_sentiment
|
909
|
-
# @return [Google::Cloud::Language::V1::Sentiment]
|
909
|
+
# @return [::Google::Cloud::Language::V1::Sentiment]
|
910
910
|
# The overall sentiment of the input document.
|
911
911
|
# @!attribute [rw] language
|
912
|
-
# @return [String]
|
912
|
+
# @return [::String]
|
913
913
|
# The language of the text, which will be the same as the language specified
|
914
914
|
# in the request or, if not specified, the automatically-detected language.
|
915
|
-
# See {Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
915
|
+
# See {::Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
916
916
|
# @!attribute [rw] sentences
|
917
|
-
# @return [Array
|
917
|
+
# @return [::Array<::Google::Cloud::Language::V1::Sentence>]
|
918
918
|
# The sentiment for all the sentences in the document.
|
919
919
|
class AnalyzeSentimentResponse
|
920
|
-
include Google::Protobuf::MessageExts
|
921
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
920
|
+
include ::Google::Protobuf::MessageExts
|
921
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
922
922
|
end
|
923
923
|
|
924
924
|
# The entity-level sentiment analysis request message.
|
925
925
|
# @!attribute [rw] document
|
926
|
-
# @return [Google::Cloud::Language::V1::Document]
|
926
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
927
927
|
# Input document.
|
928
928
|
# @!attribute [rw] encoding_type
|
929
|
-
# @return [Google::Cloud::Language::V1::EncodingType]
|
929
|
+
# @return [::Google::Cloud::Language::V1::EncodingType]
|
930
930
|
# The encoding type used by the API to calculate offsets.
|
931
931
|
class AnalyzeEntitySentimentRequest
|
932
|
-
include Google::Protobuf::MessageExts
|
933
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
932
|
+
include ::Google::Protobuf::MessageExts
|
933
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
934
934
|
end
|
935
935
|
|
936
936
|
# The entity-level sentiment analysis response message.
|
937
937
|
# @!attribute [rw] entities
|
938
|
-
# @return [Array
|
938
|
+
# @return [::Array<::Google::Cloud::Language::V1::Entity>]
|
939
939
|
# The recognized entities in the input document with associated sentiments.
|
940
940
|
# @!attribute [rw] language
|
941
|
-
# @return [String]
|
941
|
+
# @return [::String]
|
942
942
|
# The language of the text, which will be the same as the language specified
|
943
943
|
# in the request or, if not specified, the automatically-detected language.
|
944
|
-
# See {Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
944
|
+
# See {::Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
945
945
|
class AnalyzeEntitySentimentResponse
|
946
|
-
include Google::Protobuf::MessageExts
|
947
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
946
|
+
include ::Google::Protobuf::MessageExts
|
947
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
948
948
|
end
|
949
949
|
|
950
950
|
# The entity analysis request message.
|
951
951
|
# @!attribute [rw] document
|
952
|
-
# @return [Google::Cloud::Language::V1::Document]
|
952
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
953
953
|
# Input document.
|
954
954
|
# @!attribute [rw] encoding_type
|
955
|
-
# @return [Google::Cloud::Language::V1::EncodingType]
|
955
|
+
# @return [::Google::Cloud::Language::V1::EncodingType]
|
956
956
|
# The encoding type used by the API to calculate offsets.
|
957
957
|
class AnalyzeEntitiesRequest
|
958
|
-
include Google::Protobuf::MessageExts
|
959
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
958
|
+
include ::Google::Protobuf::MessageExts
|
959
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
960
960
|
end
|
961
961
|
|
962
962
|
# The entity analysis response message.
|
963
963
|
# @!attribute [rw] entities
|
964
|
-
# @return [Array
|
964
|
+
# @return [::Array<::Google::Cloud::Language::V1::Entity>]
|
965
965
|
# The recognized entities in the input document.
|
966
966
|
# @!attribute [rw] language
|
967
|
-
# @return [String]
|
967
|
+
# @return [::String]
|
968
968
|
# The language of the text, which will be the same as the language specified
|
969
969
|
# in the request or, if not specified, the automatically-detected language.
|
970
|
-
# See {Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
970
|
+
# See {::Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
971
971
|
class AnalyzeEntitiesResponse
|
972
|
-
include Google::Protobuf::MessageExts
|
973
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
972
|
+
include ::Google::Protobuf::MessageExts
|
973
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
974
974
|
end
|
975
975
|
|
976
976
|
# The syntax analysis request message.
|
977
977
|
# @!attribute [rw] document
|
978
|
-
# @return [Google::Cloud::Language::V1::Document]
|
978
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
979
979
|
# Input document.
|
980
980
|
# @!attribute [rw] encoding_type
|
981
|
-
# @return [Google::Cloud::Language::V1::EncodingType]
|
981
|
+
# @return [::Google::Cloud::Language::V1::EncodingType]
|
982
982
|
# The encoding type used by the API to calculate offsets.
|
983
983
|
class AnalyzeSyntaxRequest
|
984
|
-
include Google::Protobuf::MessageExts
|
985
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
984
|
+
include ::Google::Protobuf::MessageExts
|
985
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
986
986
|
end
|
987
987
|
|
988
988
|
# The syntax analysis response message.
|
989
989
|
# @!attribute [rw] sentences
|
990
|
-
# @return [Array
|
990
|
+
# @return [::Array<::Google::Cloud::Language::V1::Sentence>]
|
991
991
|
# Sentences in the input document.
|
992
992
|
# @!attribute [rw] tokens
|
993
|
-
# @return [Array
|
993
|
+
# @return [::Array<::Google::Cloud::Language::V1::Token>]
|
994
994
|
# Tokens, along with their syntactic information, in the input document.
|
995
995
|
# @!attribute [rw] language
|
996
|
-
# @return [String]
|
996
|
+
# @return [::String]
|
997
997
|
# The language of the text, which will be the same as the language specified
|
998
998
|
# in the request or, if not specified, the automatically-detected language.
|
999
|
-
# See {Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
999
|
+
# See {::Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
1000
1000
|
class AnalyzeSyntaxResponse
|
1001
|
-
include Google::Protobuf::MessageExts
|
1002
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1001
|
+
include ::Google::Protobuf::MessageExts
|
1002
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1003
1003
|
end
|
1004
1004
|
|
1005
1005
|
# The document classification request message.
|
1006
1006
|
# @!attribute [rw] document
|
1007
|
-
# @return [Google::Cloud::Language::V1::Document]
|
1007
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
1008
1008
|
# Input document.
|
1009
1009
|
class ClassifyTextRequest
|
1010
|
-
include Google::Protobuf::MessageExts
|
1011
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1010
|
+
include ::Google::Protobuf::MessageExts
|
1011
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1012
1012
|
end
|
1013
1013
|
|
1014
1014
|
# The document classification response message.
|
1015
1015
|
# @!attribute [rw] categories
|
1016
|
-
# @return [Array
|
1016
|
+
# @return [::Array<::Google::Cloud::Language::V1::ClassificationCategory>]
|
1017
1017
|
# Categories representing the input document.
|
1018
1018
|
class ClassifyTextResponse
|
1019
|
-
include Google::Protobuf::MessageExts
|
1020
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1019
|
+
include ::Google::Protobuf::MessageExts
|
1020
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1021
1021
|
end
|
1022
1022
|
|
1023
1023
|
# The request message for the text annotation API, which can perform multiple
|
1024
1024
|
# analysis types (sentiment, entities, and syntax) in one call.
|
1025
1025
|
# @!attribute [rw] document
|
1026
|
-
# @return [Google::Cloud::Language::V1::Document]
|
1026
|
+
# @return [::Google::Cloud::Language::V1::Document]
|
1027
1027
|
# Input document.
|
1028
1028
|
# @!attribute [rw] features
|
1029
|
-
# @return [Google::Cloud::Language::V1::AnnotateTextRequest::Features]
|
1029
|
+
# @return [::Google::Cloud::Language::V1::AnnotateTextRequest::Features]
|
1030
1030
|
# The enabled features.
|
1031
1031
|
# @!attribute [rw] encoding_type
|
1032
|
-
# @return [Google::Cloud::Language::V1::EncodingType]
|
1032
|
+
# @return [::Google::Cloud::Language::V1::EncodingType]
|
1033
1033
|
# The encoding type used by the API to calculate offsets.
|
1034
1034
|
class AnnotateTextRequest
|
1035
|
-
include Google::Protobuf::MessageExts
|
1036
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1035
|
+
include ::Google::Protobuf::MessageExts
|
1036
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1037
1037
|
|
1038
1038
|
# All available features for sentiment, syntax, and semantic analysis.
|
1039
1039
|
# Setting each one to true will enable that specific analysis for the input.
|
1040
1040
|
# @!attribute [rw] extract_syntax
|
1041
|
-
# @return [Boolean]
|
1041
|
+
# @return [::Boolean]
|
1042
1042
|
# Extract syntax information.
|
1043
1043
|
# @!attribute [rw] extract_entities
|
1044
|
-
# @return [Boolean]
|
1044
|
+
# @return [::Boolean]
|
1045
1045
|
# Extract entities.
|
1046
1046
|
# @!attribute [rw] extract_document_sentiment
|
1047
|
-
# @return [Boolean]
|
1047
|
+
# @return [::Boolean]
|
1048
1048
|
# Extract document-level sentiment.
|
1049
1049
|
# @!attribute [rw] extract_entity_sentiment
|
1050
|
-
# @return [Boolean]
|
1050
|
+
# @return [::Boolean]
|
1051
1051
|
# Extract entities and their associated sentiment.
|
1052
1052
|
# @!attribute [rw] classify_text
|
1053
|
-
# @return [Boolean]
|
1053
|
+
# @return [::Boolean]
|
1054
1054
|
# Classify the full document into categories.
|
1055
1055
|
class Features
|
1056
|
-
include Google::Protobuf::MessageExts
|
1057
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1056
|
+
include ::Google::Protobuf::MessageExts
|
1057
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1058
1058
|
end
|
1059
1059
|
end
|
1060
1060
|
|
1061
1061
|
# The text annotations response message.
|
1062
1062
|
# @!attribute [rw] sentences
|
1063
|
-
# @return [Array
|
1063
|
+
# @return [::Array<::Google::Cloud::Language::V1::Sentence>]
|
1064
1064
|
# Sentences in the input document. Populated if the user enables
|
1065
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_syntax AnnotateTextRequest.Features.extract_syntax}.
|
1065
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_syntax AnnotateTextRequest.Features.extract_syntax}.
|
1066
1066
|
# @!attribute [rw] tokens
|
1067
|
-
# @return [Array
|
1067
|
+
# @return [::Array<::Google::Cloud::Language::V1::Token>]
|
1068
1068
|
# Tokens, along with their syntactic information, in the input document.
|
1069
1069
|
# Populated if the user enables
|
1070
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_syntax AnnotateTextRequest.Features.extract_syntax}.
|
1070
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_syntax AnnotateTextRequest.Features.extract_syntax}.
|
1071
1071
|
# @!attribute [rw] entities
|
1072
|
-
# @return [Array
|
1072
|
+
# @return [::Array<::Google::Cloud::Language::V1::Entity>]
|
1073
1073
|
# Entities, along with their semantic information, in the input document.
|
1074
1074
|
# Populated if the user enables
|
1075
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entities AnnotateTextRequest.Features.extract_entities}.
|
1075
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_entities AnnotateTextRequest.Features.extract_entities}.
|
1076
1076
|
# @!attribute [rw] document_sentiment
|
1077
|
-
# @return [Google::Cloud::Language::V1::Sentiment]
|
1077
|
+
# @return [::Google::Cloud::Language::V1::Sentiment]
|
1078
1078
|
# The overall sentiment for the document. Populated if the user enables
|
1079
|
-
# {Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_document_sentiment AnnotateTextRequest.Features.extract_document_sentiment}.
|
1079
|
+
# {::Google::Cloud::Language::V1::AnnotateTextRequest::Features#extract_document_sentiment AnnotateTextRequest.Features.extract_document_sentiment}.
|
1080
1080
|
# @!attribute [rw] language
|
1081
|
-
# @return [String]
|
1081
|
+
# @return [::String]
|
1082
1082
|
# The language of the text, which will be the same as the language specified
|
1083
1083
|
# in the request or, if not specified, the automatically-detected language.
|
1084
|
-
# See {Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
1084
|
+
# See {::Google::Cloud::Language::V1::Document#language Document.language} field for more details.
|
1085
1085
|
# @!attribute [rw] categories
|
1086
|
-
# @return [Array
|
1086
|
+
# @return [::Array<::Google::Cloud::Language::V1::ClassificationCategory>]
|
1087
1087
|
# Categories identified in the input document.
|
1088
1088
|
class AnnotateTextResponse
|
1089
|
-
include Google::Protobuf::MessageExts
|
1090
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
1089
|
+
include ::Google::Protobuf::MessageExts
|
1090
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1091
1091
|
end
|
1092
1092
|
|
1093
1093
|
# Represents the text encoding that the caller uses to process the output.
|