@@ -74,6 +74,7 @@ class LanguageServiceAsyncClient:
74
74
LanguageServiceClient .parse_common_location_path
75
75
)
76
76
77
+ from_service_account_info = LanguageServiceClient .from_service_account_info
77
78
from_service_account_file = LanguageServiceClient .from_service_account_file
78
79
from_service_account_json = from_service_account_file
79
80
@@ -151,17 +152,18 @@ async def analyze_sentiment(
151
152
r"""Analyzes the sentiment of the provided text.
152
153
153
154
Args:
154
- request (:class:`~.language_service .AnalyzeSentimentRequest`):
155
+ request (:class:`google.cloud.language_v1.types .AnalyzeSentimentRequest`):
155
156
The request object. The sentiment analysis request
156
157
message.
157
- document (:class:`~.language_service .Document`):
158
+ document (:class:`google.cloud.language_v1.types .Document`):
158
159
Input document.
159
160
This corresponds to the ``document`` field
160
161
on the ``request`` instance; if ``request`` is provided, this
161
162
should not be set.
162
- encoding_type (:class:`~.language_service .EncodingType`):
163
+ encoding_type (:class:`google.cloud.language_v1.types .EncodingType`):
163
164
The encoding type used by the API to
164
165
calculate sentence offsets.
166
+
165
167
This corresponds to the ``encoding_type`` field
166
168
on the ``request`` instance; if ``request`` is provided, this
167
169
should not be set.
@@ -173,7 +175,7 @@ async def analyze_sentiment(
173
175
sent along with the request as metadata.
174
176
175
177
Returns:
176
- ~.language_service .AnalyzeSentimentResponse:
178
+ google.cloud.language_v1.types .AnalyzeSentimentResponse:
177
179
The sentiment analysis response
178
180
message.
179
181
@@ -236,16 +238,17 @@ async def analyze_entities(
236
238
properties.
237
239
238
240
Args:
239
- request (:class:`~.language_service .AnalyzeEntitiesRequest`):
241
+ request (:class:`google.cloud.language_v1.types .AnalyzeEntitiesRequest`):
240
242
The request object. The entity analysis request message.
241
- document (:class:`~.language_service .Document`):
243
+ document (:class:`google.cloud.language_v1.types .Document`):
242
244
Input document.
243
245
This corresponds to the ``document`` field
244
246
on the ``request`` instance; if ``request`` is provided, this
245
247
should not be set.
246
- encoding_type (:class:`~.language_service .EncodingType`):
248
+ encoding_type (:class:`google.cloud.language_v1.types .EncodingType`):
247
249
The encoding type used by the API to
248
250
calculate offsets.
251
+
249
252
This corresponds to the ``encoding_type`` field
250
253
on the ``request`` instance; if ``request`` is provided, this
251
254
should not be set.
@@ -257,7 +260,7 @@ async def analyze_entities(
257
260
sent along with the request as metadata.
258
261
259
262
Returns:
260
- ~.language_service .AnalyzeEntitiesResponse:
263
+ google.cloud.language_v1.types .AnalyzeEntitiesResponse:
261
264
The entity analysis response message.
262
265
"""
263
266
# Create or coerce a protobuf request object.
@@ -318,17 +321,18 @@ async def analyze_entity_sentiment(
318
321
and its mentions.
319
322
320
323
Args:
321
- request (:class:`~.language_service .AnalyzeEntitySentimentRequest`):
324
+ request (:class:`google.cloud.language_v1.types .AnalyzeEntitySentimentRequest`):
322
325
The request object. The entity-level sentiment analysis
323
326
request message.
324
- document (:class:`~.language_service .Document`):
327
+ document (:class:`google.cloud.language_v1.types .Document`):
325
328
Input document.
326
329
This corresponds to the ``document`` field
327
330
on the ``request`` instance; if ``request`` is provided, this
328
331
should not be set.
329
- encoding_type (:class:`~.language_service .EncodingType`):
332
+ encoding_type (:class:`google.cloud.language_v1.types .EncodingType`):
330
333
The encoding type used by the API to
331
334
calculate offsets.
335
+
332
336
This corresponds to the ``encoding_type`` field
333
337
on the ``request`` instance; if ``request`` is provided, this
334
338
should not be set.
@@ -340,7 +344,7 @@ async def analyze_entity_sentiment(
340
344
sent along with the request as metadata.
341
345
342
346
Returns:
343
- ~.language_service .AnalyzeEntitySentimentResponse:
347
+ google.cloud.language_v1.types .AnalyzeEntitySentimentResponse:
344
348
The entity-level sentiment analysis
345
349
response message.
346
350
@@ -402,16 +406,17 @@ async def analyze_syntax(
402
406
tags, dependency trees, and other properties.
403
407
404
408
Args:
405
- request (:class:`~.language_service .AnalyzeSyntaxRequest`):
409
+ request (:class:`google.cloud.language_v1.types .AnalyzeSyntaxRequest`):
406
410
The request object. The syntax analysis request message.
407
- document (:class:`~.language_service .Document`):
411
+ document (:class:`google.cloud.language_v1.types .Document`):
408
412
Input document.
409
413
This corresponds to the ``document`` field
410
414
on the ``request`` instance; if ``request`` is provided, this
411
415
should not be set.
412
- encoding_type (:class:`~.language_service .EncodingType`):
416
+ encoding_type (:class:`google.cloud.language_v1.types .EncodingType`):
413
417
The encoding type used by the API to
414
418
calculate offsets.
419
+
415
420
This corresponds to the ``encoding_type`` field
416
421
on the ``request`` instance; if ``request`` is provided, this
417
422
should not be set.
@@ -423,7 +428,7 @@ async def analyze_syntax(
423
428
sent along with the request as metadata.
424
429
425
430
Returns:
426
- ~.language_service .AnalyzeSyntaxResponse:
431
+ google.cloud.language_v1.types .AnalyzeSyntaxResponse:
427
432
The syntax analysis response message.
428
433
"""
429
434
# Create or coerce a protobuf request object.
@@ -480,10 +485,10 @@ async def classify_text(
480
485
r"""Classifies a document into categories.
481
486
482
487
Args:
483
- request (:class:`~.language_service .ClassifyTextRequest`):
488
+ request (:class:`google.cloud.language_v1.types .ClassifyTextRequest`):
484
489
The request object. The document classification request
485
490
message.
486
- document (:class:`~.language_service .Document`):
491
+ document (:class:`google.cloud.language_v1.types .Document`):
487
492
Input document.
488
493
This corresponds to the ``document`` field
489
494
on the ``request`` instance; if ``request`` is provided, this
@@ -496,7 +501,7 @@ async def classify_text(
496
501
sent along with the request as metadata.
497
502
498
503
Returns:
499
- ~.language_service .ClassifyTextResponse:
504
+ google.cloud.language_v1.types .ClassifyTextResponse:
500
505
The document classification response
501
506
message.
502
507
@@ -557,23 +562,24 @@ async def annotate_text(
557
562
analyzeSyntax provide in one call.
558
563
559
564
Args:
560
- request (:class:`~.language_service .AnnotateTextRequest`):
565
+ request (:class:`google.cloud.language_v1.types .AnnotateTextRequest`):
561
566
The request object. The request message for the text
562
567
annotation API, which can perform multiple analysis
563
568
types (sentiment, entities, and syntax) in one call.
564
- document (:class:`~.language_service .Document`):
569
+ document (:class:`google.cloud.language_v1.types .Document`):
565
570
Input document.
566
571
This corresponds to the ``document`` field
567
572
on the ``request`` instance; if ``request`` is provided, this
568
573
should not be set.
569
- features (:class:`~.language_service .AnnotateTextRequest.Features`):
574
+ features (:class:`google.cloud.language_v1.types .AnnotateTextRequest.Features`):
570
575
The enabled features.
571
576
This corresponds to the ``features`` field
572
577
on the ``request`` instance; if ``request`` is provided, this
573
578
should not be set.
574
- encoding_type (:class:`~.language_service .EncodingType`):
579
+ encoding_type (:class:`google.cloud.language_v1.types .EncodingType`):
575
580
The encoding type used by the API to
576
581
calculate offsets.
582
+
577
583
This corresponds to the ``encoding_type`` field
578
584
on the ``request`` instance; if ``request`` is provided, this
579
585
should not be set.
@@ -585,7 +591,7 @@ async def annotate_text(
585
591
sent along with the request as metadata.
586
592
587
593
Returns:
588
- ~.language_service .AnnotateTextResponse:
594
+ google.cloud.language_v1.types .AnnotateTextResponse:
589
595
The text annotations response
590
596
message.
591
597
0 commit comments