google-cloud-language 0.31.1 → 0.31.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/language.rb +4 -4
- data/lib/google/cloud/language/v1.rb +4 -4
- data/lib/google/cloud/language/v1/doc/google/cloud/language/v1/language_service.rb +10 -10
- data/lib/google/cloud/language/v1/language_service_client.rb +7 -7
- data/lib/google/cloud/language/v1beta2.rb +4 -4
- data/lib/google/cloud/language/v1beta2/doc/google/cloud/language/v1beta2/language_service.rb +10 -10
- data/lib/google/cloud/language/v1beta2/language_service_client.rb +7 -7
- metadata +3 -5
- data/lib/google/cloud/language/v1/doc/overview.rb +0 -94
- data/lib/google/cloud/language/v1beta2/doc/overview.rb +0 -94
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d44cbf98e55497d915bc84a64afe5e84495035ef0a87cdcde099cba7dbaac749
|
4
|
+
data.tar.gz: 86a9b5ec0bd8381e3f7f3d58f18836385dafb1dbca73b3c7aff886678958a169
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c37aa26c4ef5c4a406c07f8ca682287ea556551fa82239b2d2c888c8a00ab560d5633e92b5eecd2783f89f65125262c362a8bad948f5239c0a69e8282e5c6aef
|
7
|
+
data.tar.gz: fee3c8fb36c79d9e10f2ffd2ee8462684da2974c8b99482f94c46748a271386d35817266f35f96037d0c1a4f9e8a0a47ce9996cc7cbc373cbe9d4a23d0b3bdb8
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/
|
1
|
+
# Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
|
2
2
|
|
3
3
|
[Google Cloud Natural Language API][Product Documentation]:
|
4
4
|
Google Cloud Natural Language API provides natural language understanding
|
@@ -14,7 +14,7 @@ steps:
|
|
14
14
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
15
15
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
16
16
|
3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
17
|
-
4. [Setup Authentication.](https://
|
17
|
+
4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
18
18
|
|
19
19
|
### Installation
|
20
20
|
```
|
@@ -38,17 +38,17 @@ response = language_service_client.analyze_sentiment(document)
|
|
38
38
|
to see other available methods on the client.
|
39
39
|
- Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
40
40
|
to learn more about the product and see How-to Guides.
|
41
|
-
- View this [repository's main README](https://github.com/
|
41
|
+
- View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
42
42
|
to see the full list of Cloud APIs that we cover.
|
43
43
|
|
44
|
-
[Client Library Documentation]: https://
|
44
|
+
[Client Library Documentation]: https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-language/latest/google/cloud/language/v1
|
45
45
|
[Product Documentation]: https://cloud.google.com/natural-language
|
46
46
|
|
47
47
|
## Enabling Logging
|
48
48
|
|
49
49
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
50
50
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
51
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
51
|
+
or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
52
52
|
that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
53
53
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
54
54
|
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
# rubocop:disable LineLength
|
22
22
|
|
23
23
|
##
|
24
|
-
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/
|
24
|
+
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
|
25
25
|
#
|
26
26
|
# [Google Cloud Natural Language API][Product Documentation]:
|
27
27
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# ### Next Steps
|
59
59
|
# - Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
60
60
|
# to learn more about the product and see How-to Guides.
|
61
|
-
# - View this [repository's main README](https://github.com/
|
61
|
+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
62
62
|
# to see the full list of Cloud APIs that we cover.
|
63
63
|
#
|
64
64
|
# [Product Documentation]: https://cloud.google.com/natural-language
|
@@ -67,7 +67,7 @@ module Google
|
|
67
67
|
#
|
68
68
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
69
69
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
70
|
-
# or a [`Google::Cloud::Logging::Logger`](https://
|
70
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
71
71
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
72
72
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
73
73
|
#
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
# rubocop:disable LineLength
|
22
22
|
|
23
23
|
##
|
24
|
-
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/
|
24
|
+
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
|
25
25
|
#
|
26
26
|
# [Google Cloud Natural Language API][Product Documentation]:
|
27
27
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# ### Next Steps
|
59
59
|
# - Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
60
60
|
# to learn more about the product and see How-to Guides.
|
61
|
-
# - View this [repository's main README](https://github.com/
|
61
|
+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
62
62
|
# to see the full list of Cloud APIs that we cover.
|
63
63
|
#
|
64
64
|
# [Product Documentation]: https://cloud.google.com/natural-language
|
@@ -67,7 +67,7 @@ module Google
|
|
67
67
|
#
|
68
68
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
69
69
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
70
|
-
# or a [`Google::Cloud::Logging::Logger`](https://
|
70
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
71
71
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
72
72
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
73
73
|
#
|
@@ -22,8 +22,8 @@ module Google
|
|
22
22
|
# Represents the input to API methods.
|
23
23
|
# @!attribute [rw] type
|
24
24
|
# @return [Google::Cloud::Language::V1::Document::Type]
|
25
|
-
# Required. If the type is not set or is
|
26
|
-
# returns an
|
25
|
+
# Required. If the type is not set or is `TYPE_UNSPECIFIED`,
|
26
|
+
# returns an `INVALID_ARGUMENT` error.
|
27
27
|
# @!attribute [rw] content
|
28
28
|
# @return [String]
|
29
29
|
# The content of the input in string format.
|
@@ -41,7 +41,7 @@ module Google
|
|
41
41
|
# [Language Support](https://cloud.google.com/natural-language/docs/languages)
|
42
42
|
# lists currently supported languages for each API method.
|
43
43
|
# If the language (either specified by the caller or automatically detected)
|
44
|
-
# is not supported by the called API method, an
|
44
|
+
# is not supported by the called API method, an `INVALID_ARGUMENT` error
|
45
45
|
# is returned.
|
46
46
|
class Document
|
47
47
|
# The document types enum.
|
@@ -497,7 +497,7 @@ module Google
|
|
497
497
|
# This is the index of the token which has an arc going to this token.
|
498
498
|
# The index is the position of the token in the array of tokens returned
|
499
499
|
# by the API method. If this token is a root token, then the
|
500
|
-
#
|
500
|
+
# `head_token_index` is its own index.
|
501
501
|
# @!attribute [rw] label
|
502
502
|
# @return [Google::Cloud::Language::V1::DependencyEdge::Label]
|
503
503
|
# The parse label for the token.
|
@@ -963,26 +963,26 @@ module Google
|
|
963
963
|
class AnnotateTextResponse; end
|
964
964
|
|
965
965
|
# Represents the text encoding that the caller uses to process the output.
|
966
|
-
# Providing an
|
966
|
+
# Providing an `EncodingType` is recommended because the API provides the
|
967
967
|
# beginning offsets for various outputs, such as tokens and mentions, and
|
968
968
|
# languages that natively use different text encodings may access offsets
|
969
969
|
# differently.
|
970
970
|
module EncodingType
|
971
|
-
# If
|
972
|
-
#
|
971
|
+
# If `EncodingType` is not specified, encoding-dependent information (such as
|
972
|
+
# `begin_offset`) will be set at `-1`.
|
973
973
|
NONE = 0
|
974
974
|
|
975
|
-
# Encoding-dependent information (such as
|
975
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
976
976
|
# on the UTF-8 encoding of the input. C++ and Go are examples of languages
|
977
977
|
# that use this encoding natively.
|
978
978
|
UTF8 = 1
|
979
979
|
|
980
|
-
# Encoding-dependent information (such as
|
980
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
981
981
|
# on the UTF-16 encoding of the input. Java and Javascript are examples of
|
982
982
|
# languages that use this encoding natively.
|
983
983
|
UTF16 = 2
|
984
984
|
|
985
|
-
# Encoding-dependent information (such as
|
985
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
986
986
|
# on the UTF-32 encoding of the input. Python is an example of a language
|
987
987
|
# that uses this encoding natively.
|
988
988
|
UTF32 = 3
|
@@ -216,7 +216,7 @@ module Google
|
|
216
216
|
#
|
217
217
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
218
218
|
#
|
219
|
-
# # TODO: Initialize
|
219
|
+
# # TODO: Initialize `document`:
|
220
220
|
# document = {}
|
221
221
|
# response = language_service_client.analyze_sentiment(document)
|
222
222
|
|
@@ -256,7 +256,7 @@ module Google
|
|
256
256
|
#
|
257
257
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
258
258
|
#
|
259
|
-
# # TODO: Initialize
|
259
|
+
# # TODO: Initialize `document`:
|
260
260
|
# document = {}
|
261
261
|
# response = language_service_client.analyze_entities(document)
|
262
262
|
|
@@ -295,7 +295,7 @@ module Google
|
|
295
295
|
#
|
296
296
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
297
297
|
#
|
298
|
-
# # TODO: Initialize
|
298
|
+
# # TODO: Initialize `document`:
|
299
299
|
# document = {}
|
300
300
|
# response = language_service_client.analyze_entity_sentiment(document)
|
301
301
|
|
@@ -335,7 +335,7 @@ module Google
|
|
335
335
|
#
|
336
336
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
337
337
|
#
|
338
|
-
# # TODO: Initialize
|
338
|
+
# # TODO: Initialize `document`:
|
339
339
|
# document = {}
|
340
340
|
# response = language_service_client.analyze_syntax(document)
|
341
341
|
|
@@ -371,7 +371,7 @@ module Google
|
|
371
371
|
#
|
372
372
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
373
373
|
#
|
374
|
-
# # TODO: Initialize
|
374
|
+
# # TODO: Initialize `document`:
|
375
375
|
# document = {}
|
376
376
|
# response = language_service_client.classify_text(document)
|
377
377
|
|
@@ -412,10 +412,10 @@ module Google
|
|
412
412
|
#
|
413
413
|
# language_service_client = Google::Cloud::Language.new(version: :v1)
|
414
414
|
#
|
415
|
-
# # TODO: Initialize
|
415
|
+
# # TODO: Initialize `document`:
|
416
416
|
# document = {}
|
417
417
|
#
|
418
|
-
# # TODO: Initialize
|
418
|
+
# # TODO: Initialize `features`:
|
419
419
|
# features = {}
|
420
420
|
# response = language_service_client.annotate_text(document, features)
|
421
421
|
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
# rubocop:disable LineLength
|
22
22
|
|
23
23
|
##
|
24
|
-
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/
|
24
|
+
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
|
25
25
|
#
|
26
26
|
# [Google Cloud Natural Language API][Product Documentation]:
|
27
27
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# ### Next Steps
|
59
59
|
# - Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
60
60
|
# to learn more about the product and see How-to Guides.
|
61
|
-
# - View this [repository's main README](https://github.com/
|
61
|
+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
62
62
|
# to see the full list of Cloud APIs that we cover.
|
63
63
|
#
|
64
64
|
# [Product Documentation]: https://cloud.google.com/natural-language
|
@@ -67,7 +67,7 @@ module Google
|
|
67
67
|
#
|
68
68
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
69
69
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
70
|
-
# or a [`Google::Cloud::Logging::Logger`](https://
|
70
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
71
71
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
72
72
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
73
73
|
#
|
data/lib/google/cloud/language/v1beta2/doc/google/cloud/language/v1beta2/language_service.rb
CHANGED
@@ -22,8 +22,8 @@ module Google
|
|
22
22
|
# Represents the input to API methods.
|
23
23
|
# @!attribute [rw] type
|
24
24
|
# @return [Google::Cloud::Language::V1beta2::Document::Type]
|
25
|
-
# Required. If the type is not set or is
|
26
|
-
# returns an
|
25
|
+
# Required. If the type is not set or is `TYPE_UNSPECIFIED`,
|
26
|
+
# returns an `INVALID_ARGUMENT` error.
|
27
27
|
# @!attribute [rw] content
|
28
28
|
# @return [String]
|
29
29
|
# The content of the input in string format.
|
@@ -41,7 +41,7 @@ module Google
|
|
41
41
|
# [Language Support](https://cloud.google.com/natural-language/docs/languages)
|
42
42
|
# lists currently supported languages for each API method.
|
43
43
|
# If the language (either specified by the caller or automatically detected)
|
44
|
-
# is not supported by the called API method, an
|
44
|
+
# is not supported by the called API method, an `INVALID_ARGUMENT` error
|
45
45
|
# is returned.
|
46
46
|
class Document
|
47
47
|
# The document types enum.
|
@@ -493,7 +493,7 @@ module Google
|
|
493
493
|
# This is the index of the token which has an arc going to this token.
|
494
494
|
# The index is the position of the token in the array of tokens returned
|
495
495
|
# by the API method. If this token is a root token, then the
|
496
|
-
#
|
496
|
+
# `head_token_index` is its own index.
|
497
497
|
# @!attribute [rw] label
|
498
498
|
# @return [Google::Cloud::Language::V1beta2::DependencyEdge::Label]
|
499
499
|
# The parse label for the token.
|
@@ -960,26 +960,26 @@ module Google
|
|
960
960
|
class AnnotateTextResponse; end
|
961
961
|
|
962
962
|
# Represents the text encoding that the caller uses to process the output.
|
963
|
-
# Providing an
|
963
|
+
# Providing an `EncodingType` is recommended because the API provides the
|
964
964
|
# beginning offsets for various outputs, such as tokens and mentions, and
|
965
965
|
# languages that natively use different text encodings may access offsets
|
966
966
|
# differently.
|
967
967
|
module EncodingType
|
968
|
-
# If
|
969
|
-
#
|
968
|
+
# If `EncodingType` is not specified, encoding-dependent information (such as
|
969
|
+
# `begin_offset`) will be set at `-1`.
|
970
970
|
NONE = 0
|
971
971
|
|
972
|
-
# Encoding-dependent information (such as
|
972
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
973
973
|
# on the UTF-8 encoding of the input. C++ and Go are examples of languages
|
974
974
|
# that use this encoding natively.
|
975
975
|
UTF8 = 1
|
976
976
|
|
977
|
-
# Encoding-dependent information (such as
|
977
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
978
978
|
# on the UTF-16 encoding of the input. Java and Javascript are examples of
|
979
979
|
# languages that use this encoding natively.
|
980
980
|
UTF16 = 2
|
981
981
|
|
982
|
-
# Encoding-dependent information (such as
|
982
|
+
# Encoding-dependent information (such as `begin_offset`) is calculated based
|
983
983
|
# on the UTF-32 encoding of the input. Python is an example of a language
|
984
984
|
# that uses this encoding natively.
|
985
985
|
UTF32 = 3
|
@@ -217,7 +217,7 @@ module Google
|
|
217
217
|
#
|
218
218
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
219
219
|
#
|
220
|
-
# # TODO: Initialize
|
220
|
+
# # TODO: Initialize `document`:
|
221
221
|
# document = {}
|
222
222
|
# response = language_service_client.analyze_sentiment(document)
|
223
223
|
|
@@ -257,7 +257,7 @@ module Google
|
|
257
257
|
#
|
258
258
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
259
259
|
#
|
260
|
-
# # TODO: Initialize
|
260
|
+
# # TODO: Initialize `document`:
|
261
261
|
# document = {}
|
262
262
|
# response = language_service_client.analyze_entities(document)
|
263
263
|
|
@@ -296,7 +296,7 @@ module Google
|
|
296
296
|
#
|
297
297
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
298
298
|
#
|
299
|
-
# # TODO: Initialize
|
299
|
+
# # TODO: Initialize `document`:
|
300
300
|
# document = {}
|
301
301
|
# response = language_service_client.analyze_entity_sentiment(document)
|
302
302
|
|
@@ -336,7 +336,7 @@ module Google
|
|
336
336
|
#
|
337
337
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
338
338
|
#
|
339
|
-
# # TODO: Initialize
|
339
|
+
# # TODO: Initialize `document`:
|
340
340
|
# document = {}
|
341
341
|
# response = language_service_client.analyze_syntax(document)
|
342
342
|
|
@@ -372,7 +372,7 @@ module Google
|
|
372
372
|
#
|
373
373
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
374
374
|
#
|
375
|
-
# # TODO: Initialize
|
375
|
+
# # TODO: Initialize `document`:
|
376
376
|
# document = {}
|
377
377
|
# response = language_service_client.classify_text(document)
|
378
378
|
|
@@ -413,10 +413,10 @@ module Google
|
|
413
413
|
#
|
414
414
|
# language_service_client = Google::Cloud::Language.new(version: :v1beta2)
|
415
415
|
#
|
416
|
-
# # TODO: Initialize
|
416
|
+
# # TODO: Initialize `document`:
|
417
417
|
# document = {}
|
418
418
|
#
|
419
|
-
# # TODO: Initialize
|
419
|
+
# # TODO: Initialize `features`:
|
420
420
|
# features = {}
|
421
421
|
# response = language_service_client.annotate_text(document, features)
|
422
422
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-language
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.31.
|
4
|
+
version: 0.31.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -108,7 +108,6 @@ files:
|
|
108
108
|
- lib/google/cloud/language/v1.rb
|
109
109
|
- lib/google/cloud/language/v1/credentials.rb
|
110
110
|
- lib/google/cloud/language/v1/doc/google/cloud/language/v1/language_service.rb
|
111
|
-
- lib/google/cloud/language/v1/doc/overview.rb
|
112
111
|
- lib/google/cloud/language/v1/language_service_client.rb
|
113
112
|
- lib/google/cloud/language/v1/language_service_client_config.json
|
114
113
|
- lib/google/cloud/language/v1/language_service_pb.rb
|
@@ -116,12 +115,11 @@ files:
|
|
116
115
|
- lib/google/cloud/language/v1beta2.rb
|
117
116
|
- lib/google/cloud/language/v1beta2/credentials.rb
|
118
117
|
- lib/google/cloud/language/v1beta2/doc/google/cloud/language/v1beta2/language_service.rb
|
119
|
-
- lib/google/cloud/language/v1beta2/doc/overview.rb
|
120
118
|
- lib/google/cloud/language/v1beta2/language_service_client.rb
|
121
119
|
- lib/google/cloud/language/v1beta2/language_service_client_config.json
|
122
120
|
- lib/google/cloud/language/v1beta2/language_service_pb.rb
|
123
121
|
- lib/google/cloud/language/v1beta2/language_service_services_pb.rb
|
124
|
-
homepage: https://github.com/
|
122
|
+
homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-language
|
125
123
|
licenses:
|
126
124
|
- Apache-2.0
|
127
125
|
metadata: {}
|
@@ -1,94 +0,0 @@
|
|
1
|
-
# Copyright 2018 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Cloud
|
18
|
-
# rubocop:disable LineLength
|
19
|
-
|
20
|
-
##
|
21
|
-
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
22
|
-
#
|
23
|
-
# [Google Cloud Natural Language API][Product Documentation]:
|
24
|
-
# Google Cloud Natural Language API provides natural language understanding
|
25
|
-
# technologies to developers. Examples include sentiment analysis, entity
|
26
|
-
# recognition, and text annotations.
|
27
|
-
# - [Product Documentation][]
|
28
|
-
#
|
29
|
-
# ## Quick Start
|
30
|
-
# In order to use this library, you first need to go through the following
|
31
|
-
# steps:
|
32
|
-
#
|
33
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
35
|
-
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
36
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
|
-
#
|
38
|
-
# ### Installation
|
39
|
-
# ```
|
40
|
-
# $ gem install google-cloud-language
|
41
|
-
# ```
|
42
|
-
#
|
43
|
-
# ### Preview
|
44
|
-
# #### LanguageServiceClient
|
45
|
-
# ```rb
|
46
|
-
# require "google/cloud/language"
|
47
|
-
#
|
48
|
-
# language_service_client = Google::Cloud::Language.new
|
49
|
-
# content = "Hello, world!"
|
50
|
-
# type = :PLAIN_TEXT
|
51
|
-
# document = { content: content, type: type }
|
52
|
-
# response = language_service_client.analyze_sentiment(document)
|
53
|
-
# ```
|
54
|
-
#
|
55
|
-
# ### Next Steps
|
56
|
-
# - Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
57
|
-
# to learn more about the product and see How-to Guides.
|
58
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
59
|
-
# to see the full list of Cloud APIs that we cover.
|
60
|
-
#
|
61
|
-
# [Product Documentation]: https://cloud.google.com/natural-language
|
62
|
-
#
|
63
|
-
# ## Enabling Logging
|
64
|
-
#
|
65
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
66
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
67
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
68
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
69
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
70
|
-
#
|
71
|
-
# Configuring a Ruby stdlib logger:
|
72
|
-
#
|
73
|
-
# ```ruby
|
74
|
-
# require "logger"
|
75
|
-
#
|
76
|
-
# module MyLogger
|
77
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
78
|
-
# def logger
|
79
|
-
# LOGGER
|
80
|
-
# end
|
81
|
-
# end
|
82
|
-
#
|
83
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
84
|
-
# module GRPC
|
85
|
-
# extend MyLogger
|
86
|
-
# end
|
87
|
-
# ```
|
88
|
-
#
|
89
|
-
module Language
|
90
|
-
module V1
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
@@ -1,94 +0,0 @@
|
|
1
|
-
# Copyright 2018 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Cloud
|
18
|
-
# rubocop:disable LineLength
|
19
|
-
|
20
|
-
##
|
21
|
-
# # Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
22
|
-
#
|
23
|
-
# [Google Cloud Natural Language API][Product Documentation]:
|
24
|
-
# Google Cloud Natural Language API provides natural language understanding
|
25
|
-
# technologies to developers. Examples include sentiment analysis, entity
|
26
|
-
# recognition, and text annotations.
|
27
|
-
# - [Product Documentation][]
|
28
|
-
#
|
29
|
-
# ## Quick Start
|
30
|
-
# In order to use this library, you first need to go through the following
|
31
|
-
# steps:
|
32
|
-
#
|
33
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
35
|
-
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/library/language.googleapis.com)
|
36
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
|
-
#
|
38
|
-
# ### Installation
|
39
|
-
# ```
|
40
|
-
# $ gem install google-cloud-language
|
41
|
-
# ```
|
42
|
-
#
|
43
|
-
# ### Preview
|
44
|
-
# #### LanguageServiceClient
|
45
|
-
# ```rb
|
46
|
-
# require "google/cloud/language"
|
47
|
-
#
|
48
|
-
# language_service_client = Google::Cloud::Language.new
|
49
|
-
# content = "Hello, world!"
|
50
|
-
# type = :PLAIN_TEXT
|
51
|
-
# document = { content: content, type: type }
|
52
|
-
# response = language_service_client.analyze_sentiment(document)
|
53
|
-
# ```
|
54
|
-
#
|
55
|
-
# ### Next Steps
|
56
|
-
# - Read the [Google Cloud Natural Language API Product documentation][Product Documentation]
|
57
|
-
# to learn more about the product and see How-to Guides.
|
58
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
59
|
-
# to see the full list of Cloud APIs that we cover.
|
60
|
-
#
|
61
|
-
# [Product Documentation]: https://cloud.google.com/natural-language
|
62
|
-
#
|
63
|
-
# ## Enabling Logging
|
64
|
-
#
|
65
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
66
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
67
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
68
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
69
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
70
|
-
#
|
71
|
-
# Configuring a Ruby stdlib logger:
|
72
|
-
#
|
73
|
-
# ```ruby
|
74
|
-
# require "logger"
|
75
|
-
#
|
76
|
-
# module MyLogger
|
77
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
78
|
-
# def logger
|
79
|
-
# LOGGER
|
80
|
-
# end
|
81
|
-
# end
|
82
|
-
#
|
83
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
84
|
-
# module GRPC
|
85
|
-
# extend MyLogger
|
86
|
-
# end
|
87
|
-
# ```
|
88
|
-
#
|
89
|
-
module Language
|
90
|
-
module V1beta2
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|