google-cloud-language-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+
22
+ module Google
23
+ module Cloud
24
+ module Language
25
+ module V1
26
+ module LanguageService
27
+ # Credentials for the LanguageService API.
28
+ class Credentials < Google::Auth::Credentials
29
+ self.scope = [
30
+ "https://www.googleapis.com/auth/cloud-language",
31
+ "https://www.googleapis.com/auth/cloud-platform"
32
+ ]
33
+ self.env_vars = [
34
+ "LANGUAGE_CREDENTIALS",
35
+ "LANGUAGE_KEYFILE",
36
+ "GOOGLE_CLOUD_CREDENTIALS",
37
+ "GOOGLE_CLOUD_KEYFILE",
38
+ "GCLOUD_KEYFILE",
39
+ "LANGUAGE_CREDENTIALS_JSON",
40
+ "LANGUAGE_KEYFILE_JSON",
41
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
42
+ "GOOGLE_CLOUD_KEYFILE_JSON",
43
+ "GCLOUD_KEYFILE_JSON"
44
+ ]
45
+ self.paths = [
46
+ "~/.config/google_cloud/application_default_credentials.json"
47
+ ]
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/language/v1/language_service/client"
20
+ require "google/cloud/language/v1/language_service/credentials"
@@ -0,0 +1,404 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/language/v1/language_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/cloud/language/v1/language_service.proto", :syntax => :proto3) do
11
+ add_message "google.cloud.language.v1.Document" do
12
+ optional :type, :enum, 1, "google.cloud.language.v1.Document.Type"
13
+ optional :language, :string, 4
14
+ oneof :source do
15
+ optional :content, :string, 2
16
+ optional :gcs_content_uri, :string, 3
17
+ end
18
+ end
19
+ add_enum "google.cloud.language.v1.Document.Type" do
20
+ value :TYPE_UNSPECIFIED, 0
21
+ value :PLAIN_TEXT, 1
22
+ value :HTML, 2
23
+ end
24
+ add_message "google.cloud.language.v1.Sentence" do
25
+ optional :text, :message, 1, "google.cloud.language.v1.TextSpan"
26
+ optional :sentiment, :message, 2, "google.cloud.language.v1.Sentiment"
27
+ end
28
+ add_message "google.cloud.language.v1.Entity" do
29
+ optional :name, :string, 1
30
+ optional :type, :enum, 2, "google.cloud.language.v1.Entity.Type"
31
+ map :metadata, :string, :string, 3
32
+ optional :salience, :float, 4
33
+ repeated :mentions, :message, 5, "google.cloud.language.v1.EntityMention"
34
+ optional :sentiment, :message, 6, "google.cloud.language.v1.Sentiment"
35
+ end
36
+ add_enum "google.cloud.language.v1.Entity.Type" do
37
+ value :UNKNOWN, 0
38
+ value :PERSON, 1
39
+ value :LOCATION, 2
40
+ value :ORGANIZATION, 3
41
+ value :EVENT, 4
42
+ value :WORK_OF_ART, 5
43
+ value :CONSUMER_GOOD, 6
44
+ value :OTHER, 7
45
+ value :PHONE_NUMBER, 9
46
+ value :ADDRESS, 10
47
+ value :DATE, 11
48
+ value :NUMBER, 12
49
+ value :PRICE, 13
50
+ end
51
+ add_message "google.cloud.language.v1.Token" do
52
+ optional :text, :message, 1, "google.cloud.language.v1.TextSpan"
53
+ optional :part_of_speech, :message, 2, "google.cloud.language.v1.PartOfSpeech"
54
+ optional :dependency_edge, :message, 3, "google.cloud.language.v1.DependencyEdge"
55
+ optional :lemma, :string, 4
56
+ end
57
+ add_message "google.cloud.language.v1.Sentiment" do
58
+ optional :magnitude, :float, 2
59
+ optional :score, :float, 3
60
+ end
61
+ add_message "google.cloud.language.v1.PartOfSpeech" do
62
+ optional :tag, :enum, 1, "google.cloud.language.v1.PartOfSpeech.Tag"
63
+ optional :aspect, :enum, 2, "google.cloud.language.v1.PartOfSpeech.Aspect"
64
+ optional :case, :enum, 3, "google.cloud.language.v1.PartOfSpeech.Case"
65
+ optional :form, :enum, 4, "google.cloud.language.v1.PartOfSpeech.Form"
66
+ optional :gender, :enum, 5, "google.cloud.language.v1.PartOfSpeech.Gender"
67
+ optional :mood, :enum, 6, "google.cloud.language.v1.PartOfSpeech.Mood"
68
+ optional :number, :enum, 7, "google.cloud.language.v1.PartOfSpeech.Number"
69
+ optional :person, :enum, 8, "google.cloud.language.v1.PartOfSpeech.Person"
70
+ optional :proper, :enum, 9, "google.cloud.language.v1.PartOfSpeech.Proper"
71
+ optional :reciprocity, :enum, 10, "google.cloud.language.v1.PartOfSpeech.Reciprocity"
72
+ optional :tense, :enum, 11, "google.cloud.language.v1.PartOfSpeech.Tense"
73
+ optional :voice, :enum, 12, "google.cloud.language.v1.PartOfSpeech.Voice"
74
+ end
75
+ add_enum "google.cloud.language.v1.PartOfSpeech.Tag" do
76
+ value :UNKNOWN, 0
77
+ value :ADJ, 1
78
+ value :ADP, 2
79
+ value :ADV, 3
80
+ value :CONJ, 4
81
+ value :DET, 5
82
+ value :NOUN, 6
83
+ value :NUM, 7
84
+ value :PRON, 8
85
+ value :PRT, 9
86
+ value :PUNCT, 10
87
+ value :VERB, 11
88
+ value :X, 12
89
+ value :AFFIX, 13
90
+ end
91
+ add_enum "google.cloud.language.v1.PartOfSpeech.Aspect" do
92
+ value :ASPECT_UNKNOWN, 0
93
+ value :PERFECTIVE, 1
94
+ value :IMPERFECTIVE, 2
95
+ value :PROGRESSIVE, 3
96
+ end
97
+ add_enum "google.cloud.language.v1.PartOfSpeech.Case" do
98
+ value :CASE_UNKNOWN, 0
99
+ value :ACCUSATIVE, 1
100
+ value :ADVERBIAL, 2
101
+ value :COMPLEMENTIVE, 3
102
+ value :DATIVE, 4
103
+ value :GENITIVE, 5
104
+ value :INSTRUMENTAL, 6
105
+ value :LOCATIVE, 7
106
+ value :NOMINATIVE, 8
107
+ value :OBLIQUE, 9
108
+ value :PARTITIVE, 10
109
+ value :PREPOSITIONAL, 11
110
+ value :REFLEXIVE_CASE, 12
111
+ value :RELATIVE_CASE, 13
112
+ value :VOCATIVE, 14
113
+ end
114
+ add_enum "google.cloud.language.v1.PartOfSpeech.Form" do
115
+ value :FORM_UNKNOWN, 0
116
+ value :ADNOMIAL, 1
117
+ value :AUXILIARY, 2
118
+ value :COMPLEMENTIZER, 3
119
+ value :FINAL_ENDING, 4
120
+ value :GERUND, 5
121
+ value :REALIS, 6
122
+ value :IRREALIS, 7
123
+ value :SHORT, 8
124
+ value :LONG, 9
125
+ value :ORDER, 10
126
+ value :SPECIFIC, 11
127
+ end
128
+ add_enum "google.cloud.language.v1.PartOfSpeech.Gender" do
129
+ value :GENDER_UNKNOWN, 0
130
+ value :FEMININE, 1
131
+ value :MASCULINE, 2
132
+ value :NEUTER, 3
133
+ end
134
+ add_enum "google.cloud.language.v1.PartOfSpeech.Mood" do
135
+ value :MOOD_UNKNOWN, 0
136
+ value :CONDITIONAL_MOOD, 1
137
+ value :IMPERATIVE, 2
138
+ value :INDICATIVE, 3
139
+ value :INTERROGATIVE, 4
140
+ value :JUSSIVE, 5
141
+ value :SUBJUNCTIVE, 6
142
+ end
143
+ add_enum "google.cloud.language.v1.PartOfSpeech.Number" do
144
+ value :NUMBER_UNKNOWN, 0
145
+ value :SINGULAR, 1
146
+ value :PLURAL, 2
147
+ value :DUAL, 3
148
+ end
149
+ add_enum "google.cloud.language.v1.PartOfSpeech.Person" do
150
+ value :PERSON_UNKNOWN, 0
151
+ value :FIRST, 1
152
+ value :SECOND, 2
153
+ value :THIRD, 3
154
+ value :REFLEXIVE_PERSON, 4
155
+ end
156
+ add_enum "google.cloud.language.v1.PartOfSpeech.Proper" do
157
+ value :PROPER_UNKNOWN, 0
158
+ value :PROPER, 1
159
+ value :NOT_PROPER, 2
160
+ end
161
+ add_enum "google.cloud.language.v1.PartOfSpeech.Reciprocity" do
162
+ value :RECIPROCITY_UNKNOWN, 0
163
+ value :RECIPROCAL, 1
164
+ value :NON_RECIPROCAL, 2
165
+ end
166
+ add_enum "google.cloud.language.v1.PartOfSpeech.Tense" do
167
+ value :TENSE_UNKNOWN, 0
168
+ value :CONDITIONAL_TENSE, 1
169
+ value :FUTURE, 2
170
+ value :PAST, 3
171
+ value :PRESENT, 4
172
+ value :IMPERFECT, 5
173
+ value :PLUPERFECT, 6
174
+ end
175
+ add_enum "google.cloud.language.v1.PartOfSpeech.Voice" do
176
+ value :VOICE_UNKNOWN, 0
177
+ value :ACTIVE, 1
178
+ value :CAUSATIVE, 2
179
+ value :PASSIVE, 3
180
+ end
181
+ add_message "google.cloud.language.v1.DependencyEdge" do
182
+ optional :head_token_index, :int32, 1
183
+ optional :label, :enum, 2, "google.cloud.language.v1.DependencyEdge.Label"
184
+ end
185
+ add_enum "google.cloud.language.v1.DependencyEdge.Label" do
186
+ value :UNKNOWN, 0
187
+ value :ABBREV, 1
188
+ value :ACOMP, 2
189
+ value :ADVCL, 3
190
+ value :ADVMOD, 4
191
+ value :AMOD, 5
192
+ value :APPOS, 6
193
+ value :ATTR, 7
194
+ value :AUX, 8
195
+ value :AUXPASS, 9
196
+ value :CC, 10
197
+ value :CCOMP, 11
198
+ value :CONJ, 12
199
+ value :CSUBJ, 13
200
+ value :CSUBJPASS, 14
201
+ value :DEP, 15
202
+ value :DET, 16
203
+ value :DISCOURSE, 17
204
+ value :DOBJ, 18
205
+ value :EXPL, 19
206
+ value :GOESWITH, 20
207
+ value :IOBJ, 21
208
+ value :MARK, 22
209
+ value :MWE, 23
210
+ value :MWV, 24
211
+ value :NEG, 25
212
+ value :NN, 26
213
+ value :NPADVMOD, 27
214
+ value :NSUBJ, 28
215
+ value :NSUBJPASS, 29
216
+ value :NUM, 30
217
+ value :NUMBER, 31
218
+ value :P, 32
219
+ value :PARATAXIS, 33
220
+ value :PARTMOD, 34
221
+ value :PCOMP, 35
222
+ value :POBJ, 36
223
+ value :POSS, 37
224
+ value :POSTNEG, 38
225
+ value :PRECOMP, 39
226
+ value :PRECONJ, 40
227
+ value :PREDET, 41
228
+ value :PREF, 42
229
+ value :PREP, 43
230
+ value :PRONL, 44
231
+ value :PRT, 45
232
+ value :PS, 46
233
+ value :QUANTMOD, 47
234
+ value :RCMOD, 48
235
+ value :RCMODREL, 49
236
+ value :RDROP, 50
237
+ value :REF, 51
238
+ value :REMNANT, 52
239
+ value :REPARANDUM, 53
240
+ value :ROOT, 54
241
+ value :SNUM, 55
242
+ value :SUFF, 56
243
+ value :TMOD, 57
244
+ value :TOPIC, 58
245
+ value :VMOD, 59
246
+ value :VOCATIVE, 60
247
+ value :XCOMP, 61
248
+ value :SUFFIX, 62
249
+ value :TITLE, 63
250
+ value :ADVPHMOD, 64
251
+ value :AUXCAUS, 65
252
+ value :AUXVV, 66
253
+ value :DTMOD, 67
254
+ value :FOREIGN, 68
255
+ value :KW, 69
256
+ value :LIST, 70
257
+ value :NOMC, 71
258
+ value :NOMCSUBJ, 72
259
+ value :NOMCSUBJPASS, 73
260
+ value :NUMC, 74
261
+ value :COP, 75
262
+ value :DISLOCATED, 76
263
+ value :ASP, 77
264
+ value :GMOD, 78
265
+ value :GOBJ, 79
266
+ value :INFMOD, 80
267
+ value :MES, 81
268
+ value :NCOMP, 82
269
+ end
270
+ add_message "google.cloud.language.v1.EntityMention" do
271
+ optional :text, :message, 1, "google.cloud.language.v1.TextSpan"
272
+ optional :type, :enum, 2, "google.cloud.language.v1.EntityMention.Type"
273
+ optional :sentiment, :message, 3, "google.cloud.language.v1.Sentiment"
274
+ end
275
+ add_enum "google.cloud.language.v1.EntityMention.Type" do
276
+ value :TYPE_UNKNOWN, 0
277
+ value :PROPER, 1
278
+ value :COMMON, 2
279
+ end
280
+ add_message "google.cloud.language.v1.TextSpan" do
281
+ optional :content, :string, 1
282
+ optional :begin_offset, :int32, 2
283
+ end
284
+ add_message "google.cloud.language.v1.ClassificationCategory" do
285
+ optional :name, :string, 1
286
+ optional :confidence, :float, 2
287
+ end
288
+ add_message "google.cloud.language.v1.AnalyzeSentimentRequest" do
289
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
290
+ optional :encoding_type, :enum, 2, "google.cloud.language.v1.EncodingType"
291
+ end
292
+ add_message "google.cloud.language.v1.AnalyzeSentimentResponse" do
293
+ optional :document_sentiment, :message, 1, "google.cloud.language.v1.Sentiment"
294
+ optional :language, :string, 2
295
+ repeated :sentences, :message, 3, "google.cloud.language.v1.Sentence"
296
+ end
297
+ add_message "google.cloud.language.v1.AnalyzeEntitySentimentRequest" do
298
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
299
+ optional :encoding_type, :enum, 2, "google.cloud.language.v1.EncodingType"
300
+ end
301
+ add_message "google.cloud.language.v1.AnalyzeEntitySentimentResponse" do
302
+ repeated :entities, :message, 1, "google.cloud.language.v1.Entity"
303
+ optional :language, :string, 2
304
+ end
305
+ add_message "google.cloud.language.v1.AnalyzeEntitiesRequest" do
306
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
307
+ optional :encoding_type, :enum, 2, "google.cloud.language.v1.EncodingType"
308
+ end
309
+ add_message "google.cloud.language.v1.AnalyzeEntitiesResponse" do
310
+ repeated :entities, :message, 1, "google.cloud.language.v1.Entity"
311
+ optional :language, :string, 2
312
+ end
313
+ add_message "google.cloud.language.v1.AnalyzeSyntaxRequest" do
314
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
315
+ optional :encoding_type, :enum, 2, "google.cloud.language.v1.EncodingType"
316
+ end
317
+ add_message "google.cloud.language.v1.AnalyzeSyntaxResponse" do
318
+ repeated :sentences, :message, 1, "google.cloud.language.v1.Sentence"
319
+ repeated :tokens, :message, 2, "google.cloud.language.v1.Token"
320
+ optional :language, :string, 3
321
+ end
322
+ add_message "google.cloud.language.v1.ClassifyTextRequest" do
323
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
324
+ end
325
+ add_message "google.cloud.language.v1.ClassifyTextResponse" do
326
+ repeated :categories, :message, 1, "google.cloud.language.v1.ClassificationCategory"
327
+ end
328
+ add_message "google.cloud.language.v1.AnnotateTextRequest" do
329
+ optional :document, :message, 1, "google.cloud.language.v1.Document"
330
+ optional :features, :message, 2, "google.cloud.language.v1.AnnotateTextRequest.Features"
331
+ optional :encoding_type, :enum, 3, "google.cloud.language.v1.EncodingType"
332
+ end
333
+ add_message "google.cloud.language.v1.AnnotateTextRequest.Features" do
334
+ optional :extract_syntax, :bool, 1
335
+ optional :extract_entities, :bool, 2
336
+ optional :extract_document_sentiment, :bool, 3
337
+ optional :extract_entity_sentiment, :bool, 4
338
+ optional :classify_text, :bool, 6
339
+ end
340
+ add_message "google.cloud.language.v1.AnnotateTextResponse" do
341
+ repeated :sentences, :message, 1, "google.cloud.language.v1.Sentence"
342
+ repeated :tokens, :message, 2, "google.cloud.language.v1.Token"
343
+ repeated :entities, :message, 3, "google.cloud.language.v1.Entity"
344
+ optional :document_sentiment, :message, 4, "google.cloud.language.v1.Sentiment"
345
+ optional :language, :string, 5
346
+ repeated :categories, :message, 6, "google.cloud.language.v1.ClassificationCategory"
347
+ end
348
+ add_enum "google.cloud.language.v1.EncodingType" do
349
+ value :NONE, 0
350
+ value :UTF8, 1
351
+ value :UTF16, 2
352
+ value :UTF32, 3
353
+ end
354
+ end
355
+ end
356
+
357
+ module Google
358
+ module Cloud
359
+ module Language
360
+ module V1
361
+ Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Document").msgclass
362
+ Document::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Document.Type").enummodule
363
+ Sentence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Sentence").msgclass
364
+ Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Entity").msgclass
365
+ Entity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Entity.Type").enummodule
366
+ Token = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Token").msgclass
367
+ Sentiment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.Sentiment").msgclass
368
+ PartOfSpeech = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech").msgclass
369
+ PartOfSpeech::Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Tag").enummodule
370
+ PartOfSpeech::Aspect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Aspect").enummodule
371
+ PartOfSpeech::Case = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Case").enummodule
372
+ PartOfSpeech::Form = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Form").enummodule
373
+ PartOfSpeech::Gender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Gender").enummodule
374
+ PartOfSpeech::Mood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Mood").enummodule
375
+ PartOfSpeech::Number = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Number").enummodule
376
+ PartOfSpeech::Person = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Person").enummodule
377
+ PartOfSpeech::Proper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Proper").enummodule
378
+ PartOfSpeech::Reciprocity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Reciprocity").enummodule
379
+ PartOfSpeech::Tense = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Tense").enummodule
380
+ PartOfSpeech::Voice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.PartOfSpeech.Voice").enummodule
381
+ DependencyEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.DependencyEdge").msgclass
382
+ DependencyEdge::Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.DependencyEdge.Label").enummodule
383
+ EntityMention = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.EntityMention").msgclass
384
+ EntityMention::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.EntityMention.Type").enummodule
385
+ TextSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.TextSpan").msgclass
386
+ ClassificationCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.ClassificationCategory").msgclass
387
+ AnalyzeSentimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeSentimentRequest").msgclass
388
+ AnalyzeSentimentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeSentimentResponse").msgclass
389
+ AnalyzeEntitySentimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeEntitySentimentRequest").msgclass
390
+ AnalyzeEntitySentimentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeEntitySentimentResponse").msgclass
391
+ AnalyzeEntitiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeEntitiesRequest").msgclass
392
+ AnalyzeEntitiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeEntitiesResponse").msgclass
393
+ AnalyzeSyntaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeSyntaxRequest").msgclass
394
+ AnalyzeSyntaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnalyzeSyntaxResponse").msgclass
395
+ ClassifyTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.ClassifyTextRequest").msgclass
396
+ ClassifyTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.ClassifyTextResponse").msgclass
397
+ AnnotateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnnotateTextRequest").msgclass
398
+ AnnotateTextRequest::Features = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnnotateTextRequest.Features").msgclass
399
+ AnnotateTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.AnnotateTextResponse").msgclass
400
+ EncodingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.language.v1.EncodingType").enummodule
401
+ end
402
+ end
403
+ end
404
+ end
@@ -0,0 +1,63 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/language/v1/language_service.proto for package 'google.cloud.language.v1'
3
+ # Original file comments:
4
+ # Copyright 2019 Google LLC.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'google/cloud/language/v1/language_service_pb'
22
+
23
+ module Google
24
+ module Cloud
25
+ module Language
26
+ module V1
27
+ module LanguageService
28
+ # Provides text analysis operations such as sentiment analysis and entity
29
+ # recognition.
30
+ class Service
31
+
32
+ include GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.cloud.language.v1.LanguageService'
37
+
38
+ # Analyzes the sentiment of the provided text.
39
+ rpc :AnalyzeSentiment, AnalyzeSentimentRequest, AnalyzeSentimentResponse
40
+ # Finds named entities (currently proper names and common nouns) in the text
41
+ # along with entity types, salience, mentions for each entity, and
42
+ # other properties.
43
+ rpc :AnalyzeEntities, AnalyzeEntitiesRequest, AnalyzeEntitiesResponse
44
+ # Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes
45
+ # sentiment associated with each entity and its mentions.
46
+ rpc :AnalyzeEntitySentiment, AnalyzeEntitySentimentRequest, AnalyzeEntitySentimentResponse
47
+ # Analyzes the syntax of the text and provides sentence boundaries and
48
+ # tokenization along with part of speech tags, dependency trees, and other
49
+ # properties.
50
+ rpc :AnalyzeSyntax, AnalyzeSyntaxRequest, AnalyzeSyntaxResponse
51
+ # Classifies a document into categories.
52
+ rpc :ClassifyText, ClassifyTextRequest, ClassifyTextResponse
53
+ # A convenience method that provides all the features that analyzeSentiment,
54
+ # analyzeEntities, and analyzeSyntax provide in one call.
55
+ rpc :AnnotateText, AnnotateTextRequest, AnnotateTextResponse
56
+ end
57
+
58
+ Stub = Service.rpc_stub_class
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Language
23
+ module V1
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/language/v1/language_service"
@@ -0,0 +1 @@
1
+ require "google/cloud/language/v1/version"
@@ -0,0 +1,4 @@
1
+ # Natural Language V1 Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # An indicator of the behavior of a given field (for example, that a field
23
+ # is required in requests, or given as output but ignored as input).
24
+ # This **does not** change the behavior in protocol buffers itself; it only
25
+ # denotes the behavior and may affect how API tooling handles the field.
26
+ #
27
+ # Note: This enum **may** receive new values in the future.
28
+ module FieldBehavior
29
+ # Conventional default for enums. Do not use this.
30
+ FIELD_BEHAVIOR_UNSPECIFIED = 0
31
+
32
+ # Specifically denotes a field as optional.
33
+ # While all fields in protocol buffers are optional, this may be specified
34
+ # for emphasis if appropriate.
35
+ OPTIONAL = 1
36
+
37
+ # Denotes a field as required.
38
+ # This indicates that the field **must** be provided as part of the request,
39
+ # and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
40
+ REQUIRED = 2
41
+
42
+ # Denotes a field as output only.
43
+ # This indicates that the field is provided in responses, but including the
44
+ # field in a request does nothing (the server *must* ignore it and
45
+ # *must not* throw an error as a result of the field's presence).
46
+ OUTPUT_ONLY = 3
47
+
48
+ # Denotes a field as input only.
49
+ # This indicates that the field is provided in requests, and the
50
+ # corresponding field is not included in output.
51
+ INPUT_ONLY = 4
52
+
53
+ # Denotes a field as immutable.
54
+ # This indicates that the field may be set once in a request to create a
55
+ # resource, but may not be changed thereafter.
56
+ IMMUTABLE = 5
57
+ end
58
+ end
59
+ end