google-api-client 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/api_names.yaml +945 -41609
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +12 -12
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +2 -2
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1437 -412
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +516 -71
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +1098 -422
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +6 -6
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +3 -3
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +3 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +10 -10
- data/generated/google/apis/admin_directory_v1/service.rb +26 -26
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
- data/generated/google/apis/adsense_v1_4/representations.rb +3 -3
- data/generated/google/apis/adsense_v1_4/service.rb +44 -44
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/service.rb +22 -22
- data/generated/google/apis/analytics_v3/classes.rb +3 -3
- data/generated/google/apis/analytics_v3/representations.rb +3 -3
- data/generated/google/apis/analytics_v3/service.rb +82 -82
- data/generated/google/apis/analyticsreporting_v4/classes.rb +937 -937
- data/generated/google/apis/analyticsreporting_v4/representations.rb +128 -128
- data/generated/google/apis/analyticsreporting_v4/service.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +10 -10
- data/generated/google/apis/androidenterprise_v1/representations.rb +20 -20
- data/generated/google/apis/androidenterprise_v1/service.rb +43 -43
- data/generated/google/apis/androidpublisher_v2/classes.rb +26 -26
- data/generated/google/apis/androidpublisher_v2/representations.rb +46 -46
- data/generated/google/apis/androidpublisher_v2/service.rb +95 -95
- data/generated/google/apis/appengine_v1.rb +4 -4
- data/generated/google/apis/appengine_v1/classes.rb +1570 -1512
- data/generated/google/apis/appengine_v1/representations.rb +362 -343
- data/generated/google/apis/appengine_v1/service.rb +220 -220
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +5 -5
- data/generated/google/apis/bigquery_v2/representations.rb +8 -8
- data/generated/google/apis/bigquery_v2/service.rb +13 -13
- data/generated/google/apis/blogger_v3/service.rb +3 -3
- data/generated/google/apis/books_v1/classes.rb +55 -55
- data/generated/google/apis/books_v1/representations.rb +67 -67
- data/generated/google/apis/books_v1/service.rb +82 -82
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +6 -6
- data/generated/google/apis/calendar_v3/representations.rb +3 -3
- data/generated/google/apis/calendar_v3/service.rb +2 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +2 -2
- data/generated/google/apis/civicinfo_v2/representations.rb +4 -4
- data/generated/google/apis/civicinfo_v2/service.rb +12 -12
- data/generated/google/apis/classroom_v1.rb +7 -7
- data/generated/google/apis/classroom_v1/classes.rb +1013 -991
- data/generated/google/apis/classroom_v1/representations.rb +207 -204
- data/generated/google/apis/classroom_v1/service.rb +709 -709
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +307 -307
- data/generated/google/apis/cloudbuild_v1/representations.rb +84 -84
- data/generated/google/apis/cloudbuild_v1/service.rb +125 -125
- data/generated/google/apis/clouddebugger_v2/classes.rb +673 -673
- data/generated/google/apis/clouddebugger_v2/representations.rb +152 -152
- data/generated/google/apis/clouddebugger_v2/service.rb +55 -55
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +121 -121
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +25 -25
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +74 -74
- data/generated/google/apis/cloudkms_v1.rb +1 -1
- data/generated/google/apis/cloudkms_v1/classes.rb +668 -613
- data/generated/google/apis/cloudkms_v1/representations.rb +151 -133
- data/generated/google/apis/cloudkms_v1/service.rb +267 -267
- data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1167 -1168
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +193 -193
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +470 -469
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +508 -509
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +94 -94
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +157 -156
- data/generated/google/apis/cloudtrace_v1/service.rb +34 -34
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +163 -15
- data/generated/google/apis/compute_beta/representations.rb +54 -14
- data/generated/google/apis/compute_beta/service.rb +2258 -482
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +465 -13
- data/generated/google/apis/compute_v1/representations.rb +202 -16
- data/generated/google/apis/compute_v1/service.rb +573 -309
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +635 -589
- data/generated/google/apis/container_v1/representations.rb +139 -111
- data/generated/google/apis/container_v1/service.rb +272 -227
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +86 -74
- data/generated/google/apis/content_v2/representations.rb +107 -105
- data/generated/google/apis/content_v2/service.rb +131 -130
- data/generated/google/apis/customsearch_v1.rb +2 -2
- data/generated/google/apis/customsearch_v1/classes.rb +0 -6
- data/generated/google/apis/customsearch_v1/representations.rb +0 -1
- data/generated/google/apis/customsearch_v1/service.rb +2 -5
- data/generated/google/apis/dataflow_v1b3.rb +7 -4
- data/generated/google/apis/dataflow_v1b3/classes.rb +3405 -3405
- data/generated/google/apis/dataflow_v1b3/representations.rb +834 -834
- data/generated/google/apis/dataflow_v1b3/service.rb +244 -244
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +543 -691
- data/generated/google/apis/dataproc_v1/representations.rb +129 -185
- data/generated/google/apis/dataproc_v1/service.rb +347 -347
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +833 -833
- data/generated/google/apis/datastore_v1/representations.rb +182 -182
- data/generated/google/apis/datastore_v1/service.rb +45 -45
- data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
- data/generated/google/apis/deploymentmanager_v2/representations.rb +10 -10
- data/generated/google/apis/deploymentmanager_v2/service.rb +20 -20
- data/generated/google/apis/discovery_v1/classes.rb +4 -4
- data/generated/google/apis/discovery_v1/representations.rb +2 -2
- data/generated/google/apis/discovery_v1/service.rb +1 -1
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +3 -3
- data/generated/google/apis/dns_v1/representations.rb +6 -6
- data/generated/google/apis/dns_v1/service.rb +12 -12
- data/generated/google/apis/dns_v2beta1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +1 -1
- data/generated/google/apis/drive_v2/service.rb +1 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/service.rb +1 -1
- data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +160 -110
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +60 -31
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +38 -3
- data/generated/google/apis/firebaserules_v1/classes.rb +354 -354
- data/generated/google/apis/firebaserules_v1/representations.rb +87 -87
- data/generated/google/apis/firebaserules_v1/service.rb +103 -103
- data/generated/google/apis/fusiontables_v2/service.rb +2 -2
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +4 -4
- data/generated/google/apis/games_configuration_v1configuration/service.rb +8 -8
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/games_v1/classes.rb +23 -23
- data/generated/google/apis/games_v1/representations.rb +43 -43
- data/generated/google/apis/games_v1/service.rb +72 -72
- data/generated/google/apis/genomics_v1.rb +1 -1
- data/generated/google/apis/genomics_v1/classes.rb +2316 -2316
- data/generated/google/apis/genomics_v1/representations.rb +291 -291
- data/generated/google/apis/genomics_v1/service.rb +821 -821
- data/generated/google/apis/gmail_v1.rb +1 -1
- data/generated/google/apis/groupsmigration_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +2 -2
- data/generated/google/apis/groupssettings_v1/service.rb +3 -0
- data/generated/google/apis/iam_v1/classes.rb +338 -338
- data/generated/google/apis/iam_v1/representations.rb +98 -98
- data/generated/google/apis/iam_v1/service.rb +35 -35
- data/generated/google/apis/identitytoolkit_v3/classes.rb +15 -15
- data/generated/google/apis/identitytoolkit_v3/representations.rb +30 -30
- data/generated/google/apis/identitytoolkit_v3/service.rb +64 -64
- data/generated/google/apis/kgsearch_v1/service.rb +13 -13
- data/generated/google/apis/language_v1.rb +1 -1
- data/generated/google/apis/language_v1/classes.rb +374 -374
- data/generated/google/apis/language_v1/representations.rb +97 -97
- data/generated/google/apis/language_v1/service.rb +16 -16
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +441 -441
- data/generated/google/apis/language_v1beta1/representations.rb +108 -108
- data/generated/google/apis/language_v1beta1/service.rb +30 -30
- data/generated/google/apis/licensing_v1/service.rb +2 -2
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +712 -712
- data/generated/google/apis/logging_v2/representations.rb +109 -109
- data/generated/google/apis/logging_v2/service.rb +543 -539
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +752 -752
- data/generated/google/apis/logging_v2beta1/representations.rb +94 -94
- data/generated/google/apis/logging_v2beta1/service.rb +257 -256
- data/generated/google/apis/manufacturers_v1/classes.rb +130 -130
- data/generated/google/apis/manufacturers_v1/representations.rb +28 -28
- data/generated/google/apis/mirror_v1/classes.rb +5 -5
- data/generated/google/apis/mirror_v1/representations.rb +10 -10
- data/generated/google/apis/mirror_v1/service.rb +20 -20
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +1830 -1210
- data/generated/google/apis/ml_v1/representations.rb +342 -120
- data/generated/google/apis/ml_v1/service.rb +365 -258
- data/generated/google/apis/monitoring_v3.rb +4 -4
- data/generated/google/apis/monitoring_v3/classes.rb +889 -889
- data/generated/google/apis/monitoring_v3/representations.rb +174 -174
- data/generated/google/apis/monitoring_v3/service.rb +119 -119
- data/generated/google/apis/mybusiness_v3/service.rb +5 -5
- data/generated/google/apis/oauth2_v2/service.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2/classes.rb +11 -11
- data/generated/google/apis/pagespeedonline_v2/representations.rb +13 -13
- data/generated/google/apis/pagespeedonline_v2/service.rb +1 -1
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +550 -536
- data/generated/google/apis/partners_v2/representations.rb +118 -116
- data/generated/google/apis/partners_v2/service.rb +439 -439
- data/generated/google/apis/people_v1.rb +4 -4
- data/generated/google/apis/people_v1/classes.rb +414 -413
- data/generated/google/apis/people_v1/representations.rb +85 -85
- data/generated/google/apis/people_v1/service.rb +111 -18
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_domains_v1/service.rb +4 -4
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/plus_v1/service.rb +1 -1
- data/generated/google/apis/prediction_v1_6/service.rb +8 -8
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +443 -443
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +92 -92
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +152 -152
- data/generated/google/apis/pubsub_v1/classes.rb +249 -249
- data/generated/google/apis/pubsub_v1/representations.rb +80 -80
- data/generated/google/apis/pubsub_v1/service.rb +415 -415
- data/generated/google/apis/qpx_express_v1/classes.rb +2 -2
- data/generated/google/apis/qpx_express_v1/representations.rb +4 -4
- data/generated/google/apis/qpx_express_v1/service.rb +8 -8
- data/generated/google/apis/replicapool_v1beta2/classes.rb +5 -5
- data/generated/google/apis/replicapool_v1beta2/representations.rb +10 -10
- data/generated/google/apis/replicapool_v1beta2/service.rb +21 -21
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -1
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +5 -5
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +10 -10
- data/generated/google/apis/resourceviews_v1beta2/service.rb +20 -20
- data/generated/google/apis/runtimeconfig_v1.rb +4 -4
- data/generated/google/apis/runtimeconfig_v1/classes.rb +15 -15
- data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
- data/generated/google/apis/runtimeconfig_v1/service.rb +4 -4
- data/generated/google/apis/script_v1.rb +17 -17
- data/generated/google/apis/script_v1/classes.rb +27 -27
- data/generated/google/apis/script_v1/representations.rb +5 -5
- data/generated/google/apis/script_v1/service.rb +4 -4
- data/generated/google/apis/searchconsole_v1.rb +1 -1
- data/generated/google/apis/searchconsole_v1/classes.rb +53 -53
- data/generated/google/apis/searchconsole_v1/representations.rb +23 -23
- data/generated/google/apis/searchconsole_v1/service.rb +4 -4
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +1175 -1175
- data/generated/google/apis/servicecontrol_v1/representations.rb +206 -206
- data/generated/google/apis/servicecontrol_v1/service.rb +116 -116
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +1186 -1125
- data/generated/google/apis/servicemanagement_v1/representations.rb +241 -223
- data/generated/google/apis/servicemanagement_v1/service.rb +201 -201
- data/generated/google/apis/serviceuser_v1.rb +1 -1
- data/generated/google/apis/serviceuser_v1/classes.rb +2645 -2641
- data/generated/google/apis/serviceuser_v1/representations.rb +234 -234
- data/generated/google/apis/serviceuser_v1/service.rb +37 -37
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +5042 -4111
- data/generated/google/apis/sheets_v4/representations.rb +994 -824
- data/generated/google/apis/sheets_v4/service.rb +80 -80
- data/generated/google/apis/site_verification_v1/classes.rb +6 -6
- data/generated/google/apis/site_verification_v1/representations.rb +8 -8
- data/generated/google/apis/site_verification_v1/service.rb +12 -12
- data/generated/google/apis/slides_v1.rb +1 -1
- data/generated/google/apis/slides_v1/classes.rb +2885 -2885
- data/generated/google/apis/slides_v1/representations.rb +310 -310
- data/generated/google/apis/slides_v1/service.rb +54 -54
- data/generated/google/apis/sourcerepo_v1/classes.rb +206 -206
- data/generated/google/apis/sourcerepo_v1/representations.rb +52 -52
- data/generated/google/apis/sourcerepo_v1/service.rb +5 -5
- data/generated/google/apis/spanner_v1.rb +1 -1
- data/generated/google/apis/spanner_v1/classes.rb +2142 -2141
- data/generated/google/apis/spanner_v1/representations.rb +174 -174
- data/generated/google/apis/spanner_v1/service.rb +497 -497
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +227 -227
- data/generated/google/apis/speech_v1beta1/representations.rb +50 -50
- data/generated/google/apis/speech_v1beta1/service.rb +33 -33
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +21 -21
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +29 -29
- data/generated/google/apis/sqladmin_v1beta4/service.rb +56 -56
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +40 -6
- data/generated/google/apis/storage_v1/representations.rb +20 -4
- data/generated/google/apis/storage_v1/service.rb +61 -46
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +184 -184
- data/generated/google/apis/storagetransfer_v1/representations.rb +35 -35
- data/generated/google/apis/storagetransfer_v1/service.rb +70 -70
- data/generated/google/apis/tagmanager_v1/service.rb +33 -33
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/translate_v2/classes.rb +12 -12
- data/generated/google/apis/translate_v2/representations.rb +10 -10
- data/generated/google/apis/translate_v2/service.rb +62 -62
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1267 -1267
- data/generated/google/apis/vision_v1/representations.rb +200 -200
- data/generated/google/apis/vision_v1/service.rb +10 -10
- data/generated/google/apis/webmasters_v3.rb +1 -1
- data/generated/google/apis/webmasters_v3/classes.rb +4 -4
- data/generated/google/apis/webmasters_v3/representations.rb +8 -8
- data/generated/google/apis/webmasters_v3/service.rb +21 -21
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/classes.rb +2 -2
- data/generated/google/apis/youtube_analytics_v1/representations.rb +4 -4
- data/generated/google/apis/youtube_analytics_v1/service.rb +8 -8
- data/generated/google/apis/youtube_v3/classes.rb +20 -20
- data/generated/google/apis/youtube_v3/representations.rb +40 -40
- data/generated/google/apis/youtube_v3/service.rb +80 -80
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1/classes.rb +129 -129
- data/generated/google/apis/youtubereporting_v1/representations.rb +38 -38
- data/generated/google/apis/youtubereporting_v1/service.rb +97 -97
- data/lib/google/apis/generator/annotator.rb +2 -2
- data/lib/google/apis/generator/model.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- metadata +2 -2
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# @see https://cloud.google.com/natural-language/
|
28
28
|
module LanguageV1beta1
|
29
29
|
VERSION = 'V1beta1'
|
30
|
-
REVISION = '
|
30
|
+
REVISION = '20170601'
|
31
31
|
|
32
32
|
# View and manage your data across Google Cloud Platform services
|
33
33
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -22,128 +22,69 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module LanguageV1beta1
|
24
24
|
|
25
|
-
# Represents
|
26
|
-
class
|
25
|
+
# Represents part of speech information for a token.
|
26
|
+
class PartOfSpeech
|
27
27
|
include Google::Apis::Core::Hashable
|
28
28
|
|
29
|
-
# The
|
30
|
-
# Corresponds to the JSON property `
|
29
|
+
# The grammatical form.
|
30
|
+
# Corresponds to the JSON property `form`
|
31
31
|
# @return [String]
|
32
|
-
attr_accessor :
|
33
|
-
|
34
|
-
# The API calculates the beginning offset of the content in the original
|
35
|
-
# document according to the EncodingType specified in the API request.
|
36
|
-
# Corresponds to the JSON property `beginOffset`
|
37
|
-
# @return [Fixnum]
|
38
|
-
attr_accessor :begin_offset
|
39
|
-
|
40
|
-
def initialize(**args)
|
41
|
-
update!(**args)
|
42
|
-
end
|
43
|
-
|
44
|
-
# Update properties of this object
|
45
|
-
def update!(**args)
|
46
|
-
@content = args[:content] if args.key?(:content)
|
47
|
-
@begin_offset = args[:begin_offset] if args.key?(:begin_offset)
|
48
|
-
end
|
49
|
-
end
|
32
|
+
attr_accessor :form
|
50
33
|
|
51
|
-
|
52
|
-
|
53
|
-
|
34
|
+
# The grammatical number.
|
35
|
+
# Corresponds to the JSON property `number`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :number
|
54
38
|
|
55
|
-
#
|
56
|
-
# Corresponds to the JSON property `
|
57
|
-
# @return [
|
58
|
-
attr_accessor :
|
39
|
+
# The grammatical voice.
|
40
|
+
# Corresponds to the JSON property `voice`
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :voice
|
59
43
|
|
60
|
-
#
|
61
|
-
# Corresponds to the JSON property `
|
62
|
-
# @return [
|
63
|
-
attr_accessor :
|
44
|
+
# The grammatical aspect.
|
45
|
+
# Corresponds to the JSON property `aspect`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :aspect
|
64
48
|
|
65
|
-
#
|
66
|
-
# Corresponds to the JSON property `
|
67
|
-
# @return [
|
68
|
-
attr_accessor :
|
49
|
+
# The grammatical mood.
|
50
|
+
# Corresponds to the JSON property `mood`
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :mood
|
69
53
|
|
70
|
-
#
|
71
|
-
# Corresponds to the JSON property `
|
54
|
+
# The part of speech tag.
|
55
|
+
# Corresponds to the JSON property `tag`
|
72
56
|
# @return [String]
|
73
|
-
attr_accessor :
|
57
|
+
attr_accessor :tag
|
74
58
|
|
75
|
-
|
76
|
-
|
77
|
-
|
59
|
+
# The grammatical gender.
|
60
|
+
# Corresponds to the JSON property `gender`
|
61
|
+
# @return [String]
|
62
|
+
attr_accessor :gender
|
78
63
|
|
79
|
-
#
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
@dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
|
84
|
-
@lemma = args[:lemma] if args.key?(:lemma)
|
85
|
-
end
|
86
|
-
end
|
64
|
+
# The grammatical person.
|
65
|
+
# Corresponds to the JSON property `person`
|
66
|
+
# @return [String]
|
67
|
+
attr_accessor :person
|
87
68
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
# - Flexible enough to meet unexpected needs
|
93
|
-
# # Overview
|
94
|
-
# The `Status` message contains three pieces of data: error code, error message,
|
95
|
-
# and error details. The error code should be an enum value of
|
96
|
-
# google.rpc.Code, but it may accept additional error codes if needed. The
|
97
|
-
# error message should be a developer-facing English message that helps
|
98
|
-
# developers *understand* and *resolve* the error. If a localized user-facing
|
99
|
-
# error message is needed, put the localized message in the error details or
|
100
|
-
# localize it in the client. The optional error details may contain arbitrary
|
101
|
-
# information about the error. There is a predefined set of error detail types
|
102
|
-
# in the package `google.rpc` that can be used for common error conditions.
|
103
|
-
# # Language mapping
|
104
|
-
# The `Status` message is the logical representation of the error model, but it
|
105
|
-
# is not necessarily the actual wire format. When the `Status` message is
|
106
|
-
# exposed in different client libraries and different wire protocols, it can be
|
107
|
-
# mapped differently. For example, it will likely be mapped to some exceptions
|
108
|
-
# in Java, but more likely mapped to some error codes in C.
|
109
|
-
# # Other uses
|
110
|
-
# The error model and the `Status` message can be used in a variety of
|
111
|
-
# environments, either with or without APIs, to provide a
|
112
|
-
# consistent developer experience across different environments.
|
113
|
-
# Example uses of this error model include:
|
114
|
-
# - Partial errors. If a service needs to return partial errors to the client,
|
115
|
-
# it may embed the `Status` in the normal response to indicate the partial
|
116
|
-
# errors.
|
117
|
-
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
118
|
-
# have a `Status` message for error reporting.
|
119
|
-
# - Batch operations. If a client uses batch request and batch response, the
|
120
|
-
# `Status` message should be used directly inside batch response, one for
|
121
|
-
# each error sub-response.
|
122
|
-
# - Asynchronous operations. If an API call embeds asynchronous operation
|
123
|
-
# results in its response, the status of those operations should be
|
124
|
-
# represented directly using the `Status` message.
|
125
|
-
# - Logging. If some API errors are stored in logs, the message `Status` could
|
126
|
-
# be used directly after any stripping needed for security/privacy reasons.
|
127
|
-
class Status
|
128
|
-
include Google::Apis::Core::Hashable
|
69
|
+
# The grammatical properness.
|
70
|
+
# Corresponds to the JSON property `proper`
|
71
|
+
# @return [String]
|
72
|
+
attr_accessor :proper
|
129
73
|
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
|
134
|
-
attr_accessor :details
|
74
|
+
# The grammatical case.
|
75
|
+
# Corresponds to the JSON property `case`
|
76
|
+
# @return [String]
|
77
|
+
attr_accessor :case
|
135
78
|
|
136
|
-
# The
|
137
|
-
# Corresponds to the JSON property `
|
138
|
-
# @return [
|
139
|
-
attr_accessor :
|
79
|
+
# The grammatical tense.
|
80
|
+
# Corresponds to the JSON property `tense`
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :tense
|
140
83
|
|
141
|
-
#
|
142
|
-
#
|
143
|
-
# google.rpc.Status.details field, or localized by the client.
|
144
|
-
# Corresponds to the JSON property `message`
|
84
|
+
# The grammatical reciprocity.
|
85
|
+
# Corresponds to the JSON property `reciprocity`
|
145
86
|
# @return [String]
|
146
|
-
attr_accessor :
|
87
|
+
attr_accessor :reciprocity
|
147
88
|
|
148
89
|
def initialize(**args)
|
149
90
|
update!(**args)
|
@@ -151,26 +92,35 @@ module Google
|
|
151
92
|
|
152
93
|
# Update properties of this object
|
153
94
|
def update!(**args)
|
154
|
-
@
|
155
|
-
@
|
156
|
-
@
|
95
|
+
@form = args[:form] if args.key?(:form)
|
96
|
+
@number = args[:number] if args.key?(:number)
|
97
|
+
@voice = args[:voice] if args.key?(:voice)
|
98
|
+
@aspect = args[:aspect] if args.key?(:aspect)
|
99
|
+
@mood = args[:mood] if args.key?(:mood)
|
100
|
+
@tag = args[:tag] if args.key?(:tag)
|
101
|
+
@gender = args[:gender] if args.key?(:gender)
|
102
|
+
@person = args[:person] if args.key?(:person)
|
103
|
+
@proper = args[:proper] if args.key?(:proper)
|
104
|
+
@case = args[:case] if args.key?(:case)
|
105
|
+
@tense = args[:tense] if args.key?(:tense)
|
106
|
+
@reciprocity = args[:reciprocity] if args.key?(:reciprocity)
|
157
107
|
end
|
158
108
|
end
|
159
109
|
|
160
|
-
#
|
161
|
-
|
162
|
-
class EntityMention
|
110
|
+
# The syntax analysis request message.
|
111
|
+
class AnalyzeSyntaxRequest
|
163
112
|
include Google::Apis::Core::Hashable
|
164
113
|
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
|
114
|
+
# ################################################################ #
|
115
|
+
# Represents the input to API methods.
|
116
|
+
# Corresponds to the JSON property `document`
|
117
|
+
# @return [Google::Apis::LanguageV1beta1::Document]
|
118
|
+
attr_accessor :document
|
169
119
|
|
170
|
-
# The type
|
171
|
-
# Corresponds to the JSON property `
|
120
|
+
# The encoding type used by the API to calculate offsets.
|
121
|
+
# Corresponds to the JSON property `encodingType`
|
172
122
|
# @return [String]
|
173
|
-
attr_accessor :
|
123
|
+
attr_accessor :encoding_type
|
174
124
|
|
175
125
|
def initialize(**args)
|
176
126
|
update!(**args)
|
@@ -178,33 +128,32 @@ module Google
|
|
178
128
|
|
179
129
|
# Update properties of this object
|
180
130
|
def update!(**args)
|
181
|
-
@
|
182
|
-
@
|
131
|
+
@document = args[:document] if args.key?(:document)
|
132
|
+
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
|
183
133
|
end
|
184
134
|
end
|
185
135
|
|
186
|
-
#
|
187
|
-
|
188
|
-
class Features
|
136
|
+
# The sentiment analysis response message.
|
137
|
+
class AnalyzeSentimentResponse
|
189
138
|
include Google::Apis::Core::Hashable
|
190
139
|
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
|
195
|
-
|
140
|
+
# The language of the text, which will be the same as the language specified
|
141
|
+
# in the request or, if not specified, the automatically-detected language.
|
142
|
+
# See Document.language field for more details.
|
143
|
+
# Corresponds to the JSON property `language`
|
144
|
+
# @return [String]
|
145
|
+
attr_accessor :language
|
196
146
|
|
197
|
-
#
|
198
|
-
# Corresponds to the JSON property `
|
199
|
-
# @return [
|
200
|
-
attr_accessor :
|
201
|
-
alias_method :extract_document_sentiment?, :extract_document_sentiment
|
147
|
+
# The sentiment for all the sentences in the document.
|
148
|
+
# Corresponds to the JSON property `sentences`
|
149
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
|
150
|
+
attr_accessor :sentences
|
202
151
|
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
|
207
|
-
|
152
|
+
# Represents the feeling associated with the entire text or entities in
|
153
|
+
# the text.
|
154
|
+
# Corresponds to the JSON property `documentSentiment`
|
155
|
+
# @return [Google::Apis::LanguageV1beta1::Sentiment]
|
156
|
+
attr_accessor :document_sentiment
|
208
157
|
|
209
158
|
def initialize(**args)
|
210
159
|
update!(**args)
|
@@ -212,26 +161,27 @@ module Google
|
|
212
161
|
|
213
162
|
# Update properties of this object
|
214
163
|
def update!(**args)
|
215
|
-
@
|
216
|
-
@
|
217
|
-
@
|
164
|
+
@language = args[:language] if args.key?(:language)
|
165
|
+
@sentences = args[:sentences] if args.key?(:sentences)
|
166
|
+
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
218
167
|
end
|
219
168
|
end
|
220
169
|
|
221
|
-
#
|
222
|
-
class
|
170
|
+
# The entity analysis response message.
|
171
|
+
class AnalyzeEntitiesResponse
|
223
172
|
include Google::Apis::Core::Hashable
|
224
173
|
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
|
174
|
+
# The language of the text, which will be the same as the language specified
|
175
|
+
# in the request or, if not specified, the automatically-detected language.
|
176
|
+
# See Document.language field for more details.
|
177
|
+
# Corresponds to the JSON property `language`
|
178
|
+
# @return [String]
|
179
|
+
attr_accessor :language
|
229
180
|
|
230
|
-
#
|
231
|
-
# the
|
232
|
-
#
|
233
|
-
|
234
|
-
attr_accessor :sentiment
|
181
|
+
# The recognized entities in the input document.
|
182
|
+
# Corresponds to the JSON property `entities`
|
183
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
|
184
|
+
attr_accessor :entities
|
235
185
|
|
236
186
|
def initialize(**args)
|
237
187
|
update!(**args)
|
@@ -239,46 +189,31 @@ module Google
|
|
239
189
|
|
240
190
|
# Update properties of this object
|
241
191
|
def update!(**args)
|
242
|
-
@
|
243
|
-
@
|
192
|
+
@language = args[:language] if args.key?(:language)
|
193
|
+
@entities = args[:entities] if args.key?(:entities)
|
244
194
|
end
|
245
195
|
end
|
246
196
|
|
247
|
-
#
|
248
|
-
|
249
|
-
class Document
|
197
|
+
# The syntax analysis response message.
|
198
|
+
class AnalyzeSyntaxResponse
|
250
199
|
include Google::Apis::Core::Hashable
|
251
200
|
|
252
|
-
# The language of the
|
253
|
-
#
|
254
|
-
#
|
255
|
-
# [Language Support](/natural-language/docs/languages)
|
256
|
-
# lists currently supported languages for each API method.
|
257
|
-
# If the language (either specified by the caller or automatically detected)
|
258
|
-
# is not supported by the called API method, an `INVALID_ARGUMENT` error
|
259
|
-
# is returned.
|
201
|
+
# The language of the text, which will be the same as the language specified
|
202
|
+
# in the request or, if not specified, the automatically-detected language.
|
203
|
+
# See Document.language field for more details.
|
260
204
|
# Corresponds to the JSON property `language`
|
261
205
|
# @return [String]
|
262
206
|
attr_accessor :language
|
263
207
|
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
|
268
|
-
attr_accessor :type
|
269
|
-
|
270
|
-
# The content of the input in string format.
|
271
|
-
# Corresponds to the JSON property `content`
|
272
|
-
# @return [String]
|
273
|
-
attr_accessor :content
|
208
|
+
# Sentences in the input document.
|
209
|
+
# Corresponds to the JSON property `sentences`
|
210
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
|
211
|
+
attr_accessor :sentences
|
274
212
|
|
275
|
-
#
|
276
|
-
#
|
277
|
-
#
|
278
|
-
|
279
|
-
# Corresponds to the JSON property `gcsContentUri`
|
280
|
-
# @return [String]
|
281
|
-
attr_accessor :gcs_content_uri
|
213
|
+
# Tokens, along with their syntactic information, in the input document.
|
214
|
+
# Corresponds to the JSON property `tokens`
|
215
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
|
216
|
+
attr_accessor :tokens
|
282
217
|
|
283
218
|
def initialize(**args)
|
284
219
|
update!(**args)
|
@@ -287,36 +222,48 @@ module Google
|
|
287
222
|
# Update properties of this object
|
288
223
|
def update!(**args)
|
289
224
|
@language = args[:language] if args.key?(:language)
|
290
|
-
@
|
291
|
-
@
|
292
|
-
@gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
|
225
|
+
@sentences = args[:sentences] if args.key?(:sentences)
|
226
|
+
@tokens = args[:tokens] if args.key?(:tokens)
|
293
227
|
end
|
294
228
|
end
|
295
229
|
|
296
|
-
# Represents the
|
297
|
-
#
|
298
|
-
|
230
|
+
# Represents a phrase in the text that is a known entity, such as
|
231
|
+
# a person, an organization, or location. The API associates information, such
|
232
|
+
# as salience and mentions, with entities.
|
233
|
+
class Entity
|
299
234
|
include Google::Apis::Core::Hashable
|
300
235
|
|
301
|
-
#
|
302
|
-
#
|
303
|
-
#
|
304
|
-
|
305
|
-
# @return [Float]
|
306
|
-
attr_accessor :polarity
|
236
|
+
# The entity type.
|
237
|
+
# Corresponds to the JSON property `type`
|
238
|
+
# @return [String]
|
239
|
+
attr_accessor :type
|
307
240
|
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
|
241
|
+
# Metadata associated with the entity.
|
242
|
+
# Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
|
243
|
+
# available. The associated keys are "wikipedia_url" and "mid", respectively.
|
244
|
+
# Corresponds to the JSON property `metadata`
|
245
|
+
# @return [Hash<String,String>]
|
246
|
+
attr_accessor :metadata
|
313
247
|
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
248
|
+
# The salience score associated with the entity in the [0, 1.0] range.
|
249
|
+
# The salience score for an entity provides information about the
|
250
|
+
# importance or centrality of that entity to the entire document text.
|
251
|
+
# Scores closer to 0 are less salient, while scores closer to 1.0 are highly
|
252
|
+
# salient.
|
253
|
+
# Corresponds to the JSON property `salience`
|
318
254
|
# @return [Float]
|
319
|
-
attr_accessor :
|
255
|
+
attr_accessor :salience
|
256
|
+
|
257
|
+
# The mentions of this entity in the input document. The API currently
|
258
|
+
# supports proper noun mentions.
|
259
|
+
# Corresponds to the JSON property `mentions`
|
260
|
+
# @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
|
261
|
+
attr_accessor :mentions
|
262
|
+
|
263
|
+
# The representative name for the entity.
|
264
|
+
# Corresponds to the JSON property `name`
|
265
|
+
# @return [String]
|
266
|
+
attr_accessor :name
|
320
267
|
|
321
268
|
def initialize(**args)
|
322
269
|
update!(**args)
|
@@ -324,14 +271,17 @@ module Google
|
|
324
271
|
|
325
272
|
# Update properties of this object
|
326
273
|
def update!(**args)
|
327
|
-
@
|
328
|
-
@
|
329
|
-
@
|
274
|
+
@type = args[:type] if args.key?(:type)
|
275
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
276
|
+
@salience = args[:salience] if args.key?(:salience)
|
277
|
+
@mentions = args[:mentions] if args.key?(:mentions)
|
278
|
+
@name = args[:name] if args.key?(:name)
|
330
279
|
end
|
331
280
|
end
|
332
281
|
|
333
|
-
# The
|
334
|
-
|
282
|
+
# The request message for the text annotation API, which can perform multiple
|
283
|
+
# analysis types (sentiment, entities, and syntax) in one call.
|
284
|
+
class AnnotateTextRequest
|
335
285
|
include Google::Apis::Core::Hashable
|
336
286
|
|
337
287
|
# The encoding type used by the API to calculate offsets.
|
@@ -345,6 +295,12 @@ module Google
|
|
345
295
|
# @return [Google::Apis::LanguageV1beta1::Document]
|
346
296
|
attr_accessor :document
|
347
297
|
|
298
|
+
# All available features for sentiment, syntax, and semantic analysis.
|
299
|
+
# Setting each one to true will enable that specific analysis for the input.
|
300
|
+
# Corresponds to the JSON property `features`
|
301
|
+
# @return [Google::Apis::LanguageV1beta1::Features]
|
302
|
+
attr_accessor :features
|
303
|
+
|
348
304
|
def initialize(**args)
|
349
305
|
update!(**args)
|
350
306
|
end
|
@@ -353,72 +309,46 @@ module Google
|
|
353
309
|
def update!(**args)
|
354
310
|
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
|
355
311
|
@document = args[:document] if args.key?(:document)
|
312
|
+
@features = args[:features] if args.key?(:features)
|
356
313
|
end
|
357
314
|
end
|
358
315
|
|
359
|
-
#
|
360
|
-
class
|
316
|
+
# The text annotations response message.
|
317
|
+
class AnnotateTextResponse
|
361
318
|
include Google::Apis::Core::Hashable
|
362
319
|
|
363
|
-
# The
|
364
|
-
#
|
365
|
-
#
|
366
|
-
|
367
|
-
|
368
|
-
# The grammatical form.
|
369
|
-
# Corresponds to the JSON property `form`
|
370
|
-
# @return [String]
|
371
|
-
attr_accessor :form
|
372
|
-
|
373
|
-
# The grammatical number.
|
374
|
-
# Corresponds to the JSON property `number`
|
375
|
-
# @return [String]
|
376
|
-
attr_accessor :number
|
377
|
-
|
378
|
-
# The grammatical voice.
|
379
|
-
# Corresponds to the JSON property `voice`
|
380
|
-
# @return [String]
|
381
|
-
attr_accessor :voice
|
382
|
-
|
383
|
-
# The grammatical aspect.
|
384
|
-
# Corresponds to the JSON property `aspect`
|
385
|
-
# @return [String]
|
386
|
-
attr_accessor :aspect
|
387
|
-
|
388
|
-
# The grammatical mood.
|
389
|
-
# Corresponds to the JSON property `mood`
|
390
|
-
# @return [String]
|
391
|
-
attr_accessor :mood
|
392
|
-
|
393
|
-
# The part of speech tag.
|
394
|
-
# Corresponds to the JSON property `tag`
|
395
|
-
# @return [String]
|
396
|
-
attr_accessor :tag
|
397
|
-
|
398
|
-
# The grammatical gender.
|
399
|
-
# Corresponds to the JSON property `gender`
|
320
|
+
# The language of the text, which will be the same as the language specified
|
321
|
+
# in the request or, if not specified, the automatically-detected language.
|
322
|
+
# See Document.language field for more details.
|
323
|
+
# Corresponds to the JSON property `language`
|
400
324
|
# @return [String]
|
401
|
-
attr_accessor :
|
325
|
+
attr_accessor :language
|
402
326
|
|
403
|
-
#
|
404
|
-
#
|
405
|
-
#
|
406
|
-
|
327
|
+
# Sentences in the input document. Populated if the user enables
|
328
|
+
# AnnotateTextRequest.Features.extract_syntax.
|
329
|
+
# Corresponds to the JSON property `sentences`
|
330
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
|
331
|
+
attr_accessor :sentences
|
407
332
|
|
408
|
-
#
|
409
|
-
#
|
410
|
-
#
|
411
|
-
|
333
|
+
# Tokens, along with their syntactic information, in the input document.
|
334
|
+
# Populated if the user enables
|
335
|
+
# AnnotateTextRequest.Features.extract_syntax.
|
336
|
+
# Corresponds to the JSON property `tokens`
|
337
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
|
338
|
+
attr_accessor :tokens
|
412
339
|
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
|
340
|
+
# Entities, along with their semantic information, in the input document.
|
341
|
+
# Populated if the user enables
|
342
|
+
# AnnotateTextRequest.Features.extract_entities.
|
343
|
+
# Corresponds to the JSON property `entities`
|
344
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
|
345
|
+
attr_accessor :entities
|
417
346
|
|
418
|
-
#
|
419
|
-
#
|
420
|
-
#
|
421
|
-
|
347
|
+
# Represents the feeling associated with the entire text or entities in
|
348
|
+
# the text.
|
349
|
+
# Corresponds to the JSON property `documentSentiment`
|
350
|
+
# @return [Google::Apis::LanguageV1beta1::Sentiment]
|
351
|
+
attr_accessor :document_sentiment
|
422
352
|
|
423
353
|
def initialize(**args)
|
424
354
|
update!(**args)
|
@@ -426,26 +356,20 @@ module Google
|
|
426
356
|
|
427
357
|
# Update properties of this object
|
428
358
|
def update!(**args)
|
429
|
-
@
|
430
|
-
@
|
431
|
-
@
|
432
|
-
@
|
433
|
-
@
|
434
|
-
@mood = args[:mood] if args.key?(:mood)
|
435
|
-
@tag = args[:tag] if args.key?(:tag)
|
436
|
-
@gender = args[:gender] if args.key?(:gender)
|
437
|
-
@person = args[:person] if args.key?(:person)
|
438
|
-
@proper = args[:proper] if args.key?(:proper)
|
439
|
-
@case = args[:case] if args.key?(:case)
|
440
|
-
@tense = args[:tense] if args.key?(:tense)
|
359
|
+
@language = args[:language] if args.key?(:language)
|
360
|
+
@sentences = args[:sentences] if args.key?(:sentences)
|
361
|
+
@tokens = args[:tokens] if args.key?(:tokens)
|
362
|
+
@entities = args[:entities] if args.key?(:entities)
|
363
|
+
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
441
364
|
end
|
442
365
|
end
|
443
366
|
|
444
|
-
# The
|
445
|
-
class
|
367
|
+
# The sentiment analysis request message.
|
368
|
+
class AnalyzeSentimentRequest
|
446
369
|
include Google::Apis::Core::Hashable
|
447
370
|
|
448
|
-
# The encoding type used by the API to calculate offsets
|
371
|
+
# The encoding type used by the API to calculate sentence offsets for the
|
372
|
+
# sentence sentiment.
|
449
373
|
# Corresponds to the JSON property `encodingType`
|
450
374
|
# @return [String]
|
451
375
|
attr_accessor :encoding_type
|
@@ -467,27 +391,49 @@ module Google
|
|
467
391
|
end
|
468
392
|
end
|
469
393
|
|
470
|
-
#
|
471
|
-
class
|
394
|
+
# Represents dependency parse tree information for a token.
|
395
|
+
class DependencyEdge
|
472
396
|
include Google::Apis::Core::Hashable
|
473
397
|
|
474
|
-
# The
|
475
|
-
#
|
476
|
-
# See Document.language field for more details.
|
477
|
-
# Corresponds to the JSON property `language`
|
398
|
+
# The parse label for the token.
|
399
|
+
# Corresponds to the JSON property `label`
|
478
400
|
# @return [String]
|
479
|
-
attr_accessor :
|
401
|
+
attr_accessor :label
|
480
402
|
|
481
|
-
#
|
482
|
-
#
|
483
|
-
#
|
484
|
-
|
403
|
+
# Represents the head of this token in the dependency tree.
|
404
|
+
# This is the index of the token which has an arc going to this token.
|
405
|
+
# The index is the position of the token in the array of tokens returned
|
406
|
+
# by the API method. If this token is a root token, then the
|
407
|
+
# `head_token_index` is its own index.
|
408
|
+
# Corresponds to the JSON property `headTokenIndex`
|
409
|
+
# @return [Fixnum]
|
410
|
+
attr_accessor :head_token_index
|
485
411
|
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
412
|
+
def initialize(**args)
|
413
|
+
update!(**args)
|
414
|
+
end
|
415
|
+
|
416
|
+
# Update properties of this object
|
417
|
+
def update!(**args)
|
418
|
+
@label = args[:label] if args.key?(:label)
|
419
|
+
@head_token_index = args[:head_token_index] if args.key?(:head_token_index)
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
# Represents an output piece of text.
|
424
|
+
class TextSpan
|
425
|
+
include Google::Apis::Core::Hashable
|
426
|
+
|
427
|
+
# The API calculates the beginning offset of the content in the original
|
428
|
+
# document according to the EncodingType specified in the API request.
|
429
|
+
# Corresponds to the JSON property `beginOffset`
|
430
|
+
# @return [Fixnum]
|
431
|
+
attr_accessor :begin_offset
|
432
|
+
|
433
|
+
# The content of the output text.
|
434
|
+
# Corresponds to the JSON property `content`
|
435
|
+
# @return [String]
|
436
|
+
attr_accessor :content
|
491
437
|
|
492
438
|
def initialize(**args)
|
493
439
|
update!(**args)
|
@@ -495,27 +441,107 @@ module Google
|
|
495
441
|
|
496
442
|
# Update properties of this object
|
497
443
|
def update!(**args)
|
498
|
-
@
|
499
|
-
@
|
500
|
-
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
444
|
+
@begin_offset = args[:begin_offset] if args.key?(:begin_offset)
|
445
|
+
@content = args[:content] if args.key?(:content)
|
501
446
|
end
|
502
447
|
end
|
503
448
|
|
504
|
-
#
|
505
|
-
class
|
449
|
+
# Represents the smallest syntactic building block of the text.
|
450
|
+
class Token
|
506
451
|
include Google::Apis::Core::Hashable
|
507
452
|
|
508
|
-
#
|
509
|
-
#
|
510
|
-
#
|
511
|
-
|
453
|
+
# Represents an output piece of text.
|
454
|
+
# Corresponds to the JSON property `text`
|
455
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
456
|
+
attr_accessor :text
|
457
|
+
|
458
|
+
# Represents dependency parse tree information for a token.
|
459
|
+
# Corresponds to the JSON property `dependencyEdge`
|
460
|
+
# @return [Google::Apis::LanguageV1beta1::DependencyEdge]
|
461
|
+
attr_accessor :dependency_edge
|
462
|
+
|
463
|
+
# [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
|
464
|
+
# Corresponds to the JSON property `lemma`
|
465
|
+
# @return [String]
|
466
|
+
attr_accessor :lemma
|
467
|
+
|
468
|
+
# Represents part of speech information for a token.
|
469
|
+
# Corresponds to the JSON property `partOfSpeech`
|
470
|
+
# @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
|
471
|
+
attr_accessor :part_of_speech
|
472
|
+
|
473
|
+
def initialize(**args)
|
474
|
+
update!(**args)
|
475
|
+
end
|
476
|
+
|
477
|
+
# Update properties of this object
|
478
|
+
def update!(**args)
|
479
|
+
@text = args[:text] if args.key?(:text)
|
480
|
+
@dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
|
481
|
+
@lemma = args[:lemma] if args.key?(:lemma)
|
482
|
+
@part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
# The `Status` type defines a logical error model that is suitable for different
|
487
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
488
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
489
|
+
# - Simple to use and understand for most users
|
490
|
+
# - Flexible enough to meet unexpected needs
|
491
|
+
# # Overview
|
492
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
493
|
+
# and error details. The error code should be an enum value of
|
494
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
495
|
+
# error message should be a developer-facing English message that helps
|
496
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
497
|
+
# error message is needed, put the localized message in the error details or
|
498
|
+
# localize it in the client. The optional error details may contain arbitrary
|
499
|
+
# information about the error. There is a predefined set of error detail types
|
500
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
501
|
+
# # Language mapping
|
502
|
+
# The `Status` message is the logical representation of the error model, but it
|
503
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
504
|
+
# exposed in different client libraries and different wire protocols, it can be
|
505
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
506
|
+
# in Java, but more likely mapped to some error codes in C.
|
507
|
+
# # Other uses
|
508
|
+
# The error model and the `Status` message can be used in a variety of
|
509
|
+
# environments, either with or without APIs, to provide a
|
510
|
+
# consistent developer experience across different environments.
|
511
|
+
# Example uses of this error model include:
|
512
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
513
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
514
|
+
# errors.
|
515
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
516
|
+
# have a `Status` message for error reporting.
|
517
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
518
|
+
# `Status` message should be used directly inside batch response, one for
|
519
|
+
# each error sub-response.
|
520
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
521
|
+
# results in its response, the status of those operations should be
|
522
|
+
# represented directly using the `Status` message.
|
523
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
524
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
525
|
+
class Status
|
526
|
+
include Google::Apis::Core::Hashable
|
527
|
+
|
528
|
+
# A developer-facing error message, which should be in English. Any
|
529
|
+
# user-facing error message should be localized and sent in the
|
530
|
+
# google.rpc.Status.details field, or localized by the client.
|
531
|
+
# Corresponds to the JSON property `message`
|
512
532
|
# @return [String]
|
513
|
-
attr_accessor :
|
533
|
+
attr_accessor :message
|
514
534
|
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
518
|
-
|
535
|
+
# A list of messages that carry the error details. There will be a
|
536
|
+
# common set of message types for APIs to use.
|
537
|
+
# Corresponds to the JSON property `details`
|
538
|
+
# @return [Array<Hash<String,Object>>]
|
539
|
+
attr_accessor :details
|
540
|
+
|
541
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
542
|
+
# Corresponds to the JSON property `code`
|
543
|
+
# @return [Fixnum]
|
544
|
+
attr_accessor :code
|
519
545
|
|
520
546
|
def initialize(**args)
|
521
547
|
update!(**args)
|
@@ -523,83 +549,60 @@ module Google
|
|
523
549
|
|
524
550
|
# Update properties of this object
|
525
551
|
def update!(**args)
|
526
|
-
@
|
527
|
-
@
|
552
|
+
@message = args[:message] if args.key?(:message)
|
553
|
+
@details = args[:details] if args.key?(:details)
|
554
|
+
@code = args[:code] if args.key?(:code)
|
528
555
|
end
|
529
556
|
end
|
530
557
|
|
531
|
-
# Represents a
|
532
|
-
#
|
533
|
-
|
534
|
-
class Entity
|
558
|
+
# Represents a mention for an entity in the text. Currently, proper noun
|
559
|
+
# mentions are supported.
|
560
|
+
class EntityMention
|
535
561
|
include Google::Apis::Core::Hashable
|
536
562
|
|
537
|
-
#
|
538
|
-
#
|
539
|
-
#
|
540
|
-
|
541
|
-
attr_accessor :mentions
|
542
|
-
|
543
|
-
# The representative name for the entity.
|
544
|
-
# Corresponds to the JSON property `name`
|
545
|
-
# @return [String]
|
546
|
-
attr_accessor :name
|
563
|
+
# Represents an output piece of text.
|
564
|
+
# Corresponds to the JSON property `text`
|
565
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
566
|
+
attr_accessor :text
|
547
567
|
|
548
|
-
# The entity
|
568
|
+
# The type of the entity mention.
|
549
569
|
# Corresponds to the JSON property `type`
|
550
570
|
# @return [String]
|
551
571
|
attr_accessor :type
|
552
572
|
|
553
|
-
# Metadata associated with the entity.
|
554
|
-
# Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
|
555
|
-
# available. The associated keys are "wikipedia_url" and "mid", respectively.
|
556
|
-
# Corresponds to the JSON property `metadata`
|
557
|
-
# @return [Hash<String,String>]
|
558
|
-
attr_accessor :metadata
|
559
|
-
|
560
|
-
# The salience score associated with the entity in the [0, 1.0] range.
|
561
|
-
# The salience score for an entity provides information about the
|
562
|
-
# importance or centrality of that entity to the entire document text.
|
563
|
-
# Scores closer to 0 are less salient, while scores closer to 1.0 are highly
|
564
|
-
# salient.
|
565
|
-
# Corresponds to the JSON property `salience`
|
566
|
-
# @return [Float]
|
567
|
-
attr_accessor :salience
|
568
|
-
|
569
573
|
def initialize(**args)
|
570
574
|
update!(**args)
|
571
575
|
end
|
572
576
|
|
573
577
|
# Update properties of this object
|
574
578
|
def update!(**args)
|
575
|
-
@
|
576
|
-
@name = args[:name] if args.key?(:name)
|
579
|
+
@text = args[:text] if args.key?(:text)
|
577
580
|
@type = args[:type] if args.key?(:type)
|
578
|
-
@metadata = args[:metadata] if args.key?(:metadata)
|
579
|
-
@salience = args[:salience] if args.key?(:salience)
|
580
581
|
end
|
581
582
|
end
|
582
583
|
|
583
|
-
#
|
584
|
-
|
584
|
+
# All available features for sentiment, syntax, and semantic analysis.
|
585
|
+
# Setting each one to true will enable that specific analysis for the input.
|
586
|
+
class Features
|
585
587
|
include Google::Apis::Core::Hashable
|
586
588
|
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
|
591
|
-
|
592
|
-
attr_accessor :language
|
589
|
+
# Extract entities.
|
590
|
+
# Corresponds to the JSON property `extractEntities`
|
591
|
+
# @return [Boolean]
|
592
|
+
attr_accessor :extract_entities
|
593
|
+
alias_method :extract_entities?, :extract_entities
|
593
594
|
|
594
|
-
#
|
595
|
-
# Corresponds to the JSON property `
|
596
|
-
# @return [
|
597
|
-
attr_accessor :
|
595
|
+
# Extract syntax information.
|
596
|
+
# Corresponds to the JSON property `extractSyntax`
|
597
|
+
# @return [Boolean]
|
598
|
+
attr_accessor :extract_syntax
|
599
|
+
alias_method :extract_syntax?, :extract_syntax
|
598
600
|
|
599
|
-
#
|
600
|
-
# Corresponds to the JSON property `
|
601
|
-
# @return [
|
602
|
-
attr_accessor :
|
601
|
+
# Extract document-level sentiment.
|
602
|
+
# Corresponds to the JSON property `extractDocumentSentiment`
|
603
|
+
# @return [Boolean]
|
604
|
+
attr_accessor :extract_document_sentiment
|
605
|
+
alias_method :extract_document_sentiment?, :extract_document_sentiment
|
603
606
|
|
604
607
|
def initialize(**args)
|
605
608
|
update!(**args)
|
@@ -607,33 +610,47 @@ module Google
|
|
607
610
|
|
608
611
|
# Update properties of this object
|
609
612
|
def update!(**args)
|
610
|
-
@
|
611
|
-
@
|
612
|
-
@
|
613
|
+
@extract_entities = args[:extract_entities] if args.key?(:extract_entities)
|
614
|
+
@extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
|
615
|
+
@extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
|
613
616
|
end
|
614
617
|
end
|
615
618
|
|
616
|
-
#
|
617
|
-
#
|
618
|
-
class
|
619
|
+
# ################################################################ #
|
620
|
+
# Represents the input to API methods.
|
621
|
+
class Document
|
619
622
|
include Google::Apis::Core::Hashable
|
620
623
|
|
621
|
-
#
|
622
|
-
#
|
623
|
-
#
|
624
|
-
#
|
625
|
-
|
624
|
+
# The Google Cloud Storage URI where the file content is located.
|
625
|
+
# This URI must be of the form: gs://bucket_name/object_name. For more
|
626
|
+
# details, see https://cloud.google.com/storage/docs/reference-uris.
|
627
|
+
# NOTE: Cloud Storage object versioning is not supported.
|
628
|
+
# Corresponds to the JSON property `gcsContentUri`
|
629
|
+
# @return [String]
|
630
|
+
attr_accessor :gcs_content_uri
|
626
631
|
|
627
|
-
# The
|
628
|
-
#
|
632
|
+
# The language of the document (if not specified, the language is
|
633
|
+
# automatically detected). Both ISO and BCP-47 language codes are
|
634
|
+
# accepted.<br>
|
635
|
+
# [Language Support](/natural-language/docs/languages)
|
636
|
+
# lists currently supported languages for each API method.
|
637
|
+
# If the language (either specified by the caller or automatically detected)
|
638
|
+
# is not supported by the called API method, an `INVALID_ARGUMENT` error
|
639
|
+
# is returned.
|
640
|
+
# Corresponds to the JSON property `language`
|
629
641
|
# @return [String]
|
630
|
-
attr_accessor :
|
642
|
+
attr_accessor :language
|
631
643
|
|
632
|
-
#
|
633
|
-
#
|
634
|
-
# Corresponds to the JSON property `
|
635
|
-
# @return [
|
636
|
-
attr_accessor :
|
644
|
+
# Required. If the type is not set or is `TYPE_UNSPECIFIED`,
|
645
|
+
# returns an `INVALID_ARGUMENT` error.
|
646
|
+
# Corresponds to the JSON property `type`
|
647
|
+
# @return [String]
|
648
|
+
attr_accessor :type
|
649
|
+
|
650
|
+
# The content of the input in string format.
|
651
|
+
# Corresponds to the JSON property `content`
|
652
|
+
# @return [String]
|
653
|
+
attr_accessor :content
|
637
654
|
|
638
655
|
def initialize(**args)
|
639
656
|
update!(**args)
|
@@ -641,48 +658,27 @@ module Google
|
|
641
658
|
|
642
659
|
# Update properties of this object
|
643
660
|
def update!(**args)
|
644
|
-
@
|
645
|
-
@
|
646
|
-
@
|
661
|
+
@gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
|
662
|
+
@language = args[:language] if args.key?(:language)
|
663
|
+
@type = args[:type] if args.key?(:type)
|
664
|
+
@content = args[:content] if args.key?(:content)
|
647
665
|
end
|
648
666
|
end
|
649
667
|
|
650
|
-
#
|
651
|
-
class
|
668
|
+
# Represents a sentence in the input document.
|
669
|
+
class Sentence
|
652
670
|
include Google::Apis::Core::Hashable
|
653
671
|
|
654
|
-
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
|
658
|
-
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
|
659
|
-
attr_accessor :tokens
|
660
|
-
|
661
|
-
# Entities, along with their semantic information, in the input document.
|
662
|
-
# Populated if the user enables
|
663
|
-
# AnnotateTextRequest.Features.extract_entities.
|
664
|
-
# Corresponds to the JSON property `entities`
|
665
|
-
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
|
666
|
-
attr_accessor :entities
|
672
|
+
# Represents an output piece of text.
|
673
|
+
# Corresponds to the JSON property `text`
|
674
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
675
|
+
attr_accessor :text
|
667
676
|
|
668
677
|
# Represents the feeling associated with the entire text or entities in
|
669
678
|
# the text.
|
670
|
-
# Corresponds to the JSON property `
|
679
|
+
# Corresponds to the JSON property `sentiment`
|
671
680
|
# @return [Google::Apis::LanguageV1beta1::Sentiment]
|
672
|
-
attr_accessor :
|
673
|
-
|
674
|
-
# The language of the text, which will be the same as the language specified
|
675
|
-
# in the request or, if not specified, the automatically-detected language.
|
676
|
-
# See Document.language field for more details.
|
677
|
-
# Corresponds to the JSON property `language`
|
678
|
-
# @return [String]
|
679
|
-
attr_accessor :language
|
680
|
-
|
681
|
-
# Sentences in the input document. Populated if the user enables
|
682
|
-
# AnnotateTextRequest.Features.extract_syntax.
|
683
|
-
# Corresponds to the JSON property `sentences`
|
684
|
-
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
|
685
|
-
attr_accessor :sentences
|
681
|
+
attr_accessor :sentiment
|
686
682
|
|
687
683
|
def initialize(**args)
|
688
684
|
update!(**args)
|
@@ -690,20 +686,16 @@ module Google
|
|
690
686
|
|
691
687
|
# Update properties of this object
|
692
688
|
def update!(**args)
|
693
|
-
@
|
694
|
-
@
|
695
|
-
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
696
|
-
@language = args[:language] if args.key?(:language)
|
697
|
-
@sentences = args[:sentences] if args.key?(:sentences)
|
689
|
+
@text = args[:text] if args.key?(:text)
|
690
|
+
@sentiment = args[:sentiment] if args.key?(:sentiment)
|
698
691
|
end
|
699
692
|
end
|
700
693
|
|
701
|
-
# The
|
702
|
-
class
|
694
|
+
# The entity analysis request message.
|
695
|
+
class AnalyzeEntitiesRequest
|
703
696
|
include Google::Apis::Core::Hashable
|
704
697
|
|
705
|
-
# The encoding type used by the API to calculate
|
706
|
-
# sentence sentiment.
|
698
|
+
# The encoding type used by the API to calculate offsets.
|
707
699
|
# Corresponds to the JSON property `encodingType`
|
708
700
|
# @return [String]
|
709
701
|
attr_accessor :encoding_type
|
@@ -725,23 +717,30 @@ module Google
|
|
725
717
|
end
|
726
718
|
end
|
727
719
|
|
728
|
-
# Represents
|
729
|
-
|
720
|
+
# Represents the feeling associated with the entire text or entities in
|
721
|
+
# the text.
|
722
|
+
class Sentiment
|
730
723
|
include Google::Apis::Core::Hashable
|
731
724
|
|
732
|
-
#
|
733
|
-
#
|
734
|
-
#
|
735
|
-
|
725
|
+
# DEPRECATED FIELD - This field is being deprecated in
|
726
|
+
# favor of score. Please refer to our documentation at
|
727
|
+
# https://cloud.google.com/natural-language/docs for more information.
|
728
|
+
# Corresponds to the JSON property `polarity`
|
729
|
+
# @return [Float]
|
730
|
+
attr_accessor :polarity
|
736
731
|
|
737
|
-
#
|
738
|
-
#
|
739
|
-
#
|
740
|
-
#
|
741
|
-
|
742
|
-
|
743
|
-
#
|
744
|
-
|
732
|
+
# Sentiment score between -1.0 (negative sentiment) and 1.0
|
733
|
+
# (positive sentiment).
|
734
|
+
# Corresponds to the JSON property `score`
|
735
|
+
# @return [Float]
|
736
|
+
attr_accessor :score
|
737
|
+
|
738
|
+
# A non-negative number in the [0, +inf) range, which represents
|
739
|
+
# the absolute magnitude of sentiment regardless of score (positive or
|
740
|
+
# negative).
|
741
|
+
# Corresponds to the JSON property `magnitude`
|
742
|
+
# @return [Float]
|
743
|
+
attr_accessor :magnitude
|
745
744
|
|
746
745
|
def initialize(**args)
|
747
746
|
update!(**args)
|
@@ -749,8 +748,9 @@ module Google
|
|
749
748
|
|
750
749
|
# Update properties of this object
|
751
750
|
def update!(**args)
|
752
|
-
@
|
753
|
-
@
|
751
|
+
@polarity = args[:polarity] if args.key?(:polarity)
|
752
|
+
@score = args[:score] if args.key?(:score)
|
753
|
+
@magnitude = args[:magnitude] if args.key?(:magnitude)
|
754
754
|
end
|
755
755
|
end
|
756
756
|
end
|