ibm_watson 2.0.0.rc1 → 2.0.0
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 -2
- data/lib/ibm_watson/assistant_v1.rb +1 -1
- data/lib/ibm_watson/assistant_v2.rb +1 -1
- data/lib/ibm_watson/compare_comply_v1.rb +1 -1
- data/lib/ibm_watson/discovery_v1.rb +1 -1
- data/lib/ibm_watson/discovery_v2.rb +1 -1
- data/lib/ibm_watson/language_translator_v3.rb +1 -1
- data/lib/ibm_watson/natural_language_classifier_v1.rb +1 -1
- data/lib/ibm_watson/natural_language_understanding_v1.rb +1 -1
- data/lib/ibm_watson/personality_insights_v3.rb +18 -11
- data/lib/ibm_watson/speech_to_text_v1.rb +1 -1
- data/lib/ibm_watson/text_to_speech_v1.rb +1 -1
- data/lib/ibm_watson/tone_analyzer_v3.rb +1 -1
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +10 -4
- data/lib/ibm_watson/visual_recognition_v4.rb +15 -13
- data/test/integration/test_discovery_v2.rb +14 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7e49f743ec6be9987f928f1ef0cfb20940e25d725cbcb615fe91ac7ccf358a9
|
4
|
+
data.tar.gz: eaca308aac3243d51701f84360eded5d2bb80e9afeac79ef38f1c17803732823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 064c105ef4d1e9f40f2c5b295afcd0309d77c8ecd408e0937d56136af53cf4ac5df5c09d550a9859820f30df7bf71a8e16ffceba0c637e0c3b7effc7728516c6
|
7
|
+
data.tar.gz: 8d6632a93f2864c9ffe12a7e3ab3e0fa07e38004ac81baa376d7f2926cac032fdcfbaa08600713b31211f632d343031ee1c7809d5ef979502b70476f405fbead
|
data/README.md
CHANGED
@@ -35,11 +35,14 @@ Ruby gem to quickly get started with the various [IBM Watson][wdc] services.
|
|
35
35
|
</details>
|
36
36
|
|
37
37
|
## ANNOUNCEMENTS!
|
38
|
-
### Personality Insights
|
39
|
-
IBM
|
38
|
+
### Personality Insights deprecation
|
39
|
+
IBM Watson™ Personality Insights is discontinued. For a period of one year from 1 December 2020, you will still be able to use Watson Personality Insights. However, as of 1 December 2021, the offering will no longer be available.
|
40
40
|
|
41
41
|
As an alternative, we encourage you to consider migrating to IBM Watson™ [Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding), a service on IBM Cloud® that uses deep learning to extract data and insights from text such as keywords, categories, sentiment, emotion, and syntax to provide insights for your business or industry. For more information, see About Natural Language Understanding.
|
42
42
|
|
43
|
+
### Visual Recognition deprecation
|
44
|
+
IBM Watson™ Visual Recognition is discontinued. Existing instances are supported until 1 December 2021, but as of 7 January 2021, you can't create instances. Any instance that is provisioned on 1 December 2021 will be deleted.
|
45
|
+
|
43
46
|
## Before you begin
|
44
47
|
|
45
48
|
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Assistant service combines machine learning, natural language
|
20
20
|
# understanding, and an integrated dialog editor to create conversation flows between your
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Assistant service combines machine learning, natural language
|
20
20
|
# understanding, and an integrated dialog editor to create conversation flows between your
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# IBM Watson™ Compare and Comply analyzes governing documents to provide details
|
20
20
|
# about critical aspects of the documents.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# IBM Watson™ Discovery is a cognitive search and content analytics engine that
|
20
20
|
# you can add to applications to identify patterns, trends and actionable insights to
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# IBM Watson™ Discovery is a cognitive search and content analytics engine that
|
20
20
|
# you can add to applications to identify patterns, trends and actionable insights to
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# IBM Watson™ Language Translator translates text from one language to another.
|
20
20
|
# The service offers multiple IBM-provided translation models that you can customize based
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# IBM Watson™ Natural Language Classifier uses machine learning algorithms to
|
20
20
|
# return the top matching predefined classes for short text input. You create and train a
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# Analyze various features of text content at scale. Provide text, raw HTML, or a public
|
20
20
|
# URL and IBM Watson Natural Language Understanding will give you results for the features
|
@@ -14,13 +14,24 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
19
|
+
# IBM® will begin sunsetting IBM Watson™ Personality Insights on 1 December
|
20
|
+
# 2020. For a period of one year from this date, you will still be able to use Watson
|
21
|
+
# Personality Insights. However, as of 1 December 2021, the offering will no longer be
|
22
|
+
# available.<br/><br/>As an alternative, we encourage you to consider migrating to IBM
|
23
|
+
# Watson™ Natural Language Understanding, a service on IBM Cloud® that uses deep
|
24
|
+
# learning to extract data and insights from text such as keywords, categories, sentiment,
|
25
|
+
# emotion, and syntax to provide insights for your business or industry. For more
|
26
|
+
# information, see [About Natural Language
|
27
|
+
# Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-about).
|
28
|
+
# {: deprecated}
|
29
|
+
#
|
30
|
+
# The IBM Watson Personality Insights service enables applications to derive insights from
|
31
|
+
# social media, enterprise data, or other digital communications. The service uses
|
32
|
+
# linguistic analytics to infer individuals' intrinsic personality characteristics,
|
33
|
+
# including Big Five, Needs, and Values, from digital communications such as email, text
|
34
|
+
# messages, tweets, and forum posts.
|
24
35
|
#
|
25
36
|
# The service can automatically infer, from potentially noisy social media, portraits of
|
26
37
|
# individuals that reflect their personality characteristics. The service can infer
|
@@ -64,12 +75,8 @@ module IBMWatson
|
|
64
75
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
65
76
|
# @option args service_name [String] The name of the service to configure. Will be used as the key to load
|
66
77
|
# any external configuration, if applicable.
|
67
|
-
#
|
68
|
-
# @deprecated On 1 December 2021, Personality Insights will no longer be available.
|
69
|
-
# Consider migrating to Watson Natural Language Understanding.
|
70
|
-
# For more information, see [Personality Insights Deprecation](https://github.com/watson-developer-cloud/ruby-sdk/tree/master#personality-insights-deprecation).
|
71
78
|
def initialize(args = {})
|
72
|
-
warn "On 1 December 2021, Personality Insights will no longer be available. For more information, see
|
79
|
+
warn "On 1 December 2021, Personality Insights will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk/tree/master#personality-insights-deprecation."
|
73
80
|
@__async_initialized__ = false
|
74
81
|
defaults = {}
|
75
82
|
defaults[:service_url] = DEFAULT_SERVICE_URL
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Speech to Text service provides APIs that use IBM's
|
20
20
|
# speech-recognition capabilities to produce transcripts of spoken audio. The service can
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Text to Speech service provides APIs that use IBM's
|
20
20
|
# speech-synthesis capabilities to synthesize text into natural-sounding speech in a
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Tone Analyzer service uses linguistic analysis to detect
|
20
20
|
# emotional and language tones in written text. The service can analyze tone at both the
|
data/lib/ibm_watson/version.rb
CHANGED
@@ -14,11 +14,16 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
19
|
+
# IBM Watson™ Visual Recognition is discontinued. Existing instances are supported
|
20
|
+
# until 1 December 2021, but as of 7 January 2021, you can't create instances. Any
|
21
|
+
# instance that is provisioned on 1 December 2021 will be deleted.
|
22
|
+
# {: deprecated}
|
23
|
+
#
|
24
|
+
# The IBM Watson Visual Recognition service uses deep learning algorithms to identify
|
25
|
+
# scenes and objects in images that you upload to the service. You can create and train a
|
26
|
+
# custom classifier to identify subjects that suit your needs.
|
22
27
|
|
23
28
|
require "concurrent"
|
24
29
|
require "erb"
|
@@ -48,6 +53,7 @@ module IBMWatson
|
|
48
53
|
# @option args service_name [String] The name of the service to configure. Will be used as the key to load
|
49
54
|
# any external configuration, if applicable.
|
50
55
|
def initialize(args = {})
|
56
|
+
warn "On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk/tree/master#visual-recognition-deprecation."
|
51
57
|
@__async_initialized__ = false
|
52
58
|
defaults = {}
|
53
59
|
defaults[:service_url] = DEFAULT_SERVICE_URL
|
@@ -14,10 +14,15 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
|
18
18
|
#
|
19
|
-
#
|
20
|
-
#
|
19
|
+
# IBM Watson™ Visual Recognition is discontinued. Existing instances are supported
|
20
|
+
# until 1 December 2021, but as of 7 January 2021, you can't create instances. Any
|
21
|
+
# instance that is provisioned on 1 December 2021 will be deleted.
|
22
|
+
# {: deprecated}
|
23
|
+
#
|
24
|
+
# Provide images to the IBM Watson Visual Recognition service for analysis. The service
|
25
|
+
# detects objects based on a set of images with training data.
|
21
26
|
|
22
27
|
require "concurrent"
|
23
28
|
require "erb"
|
@@ -47,6 +52,7 @@ module IBMWatson
|
|
47
52
|
# @option args service_name [String] The name of the service to configure. Will be used as the key to load
|
48
53
|
# any external configuration, if applicable.
|
49
54
|
def initialize(args = {})
|
55
|
+
warn "On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk/tree/master#visual-recognition-deprecation."
|
50
56
|
@__async_initialized__ = false
|
51
57
|
defaults = {}
|
52
58
|
defaults[:service_url] = DEFAULT_SERVICE_URL
|
@@ -153,7 +159,7 @@ module IBMWatson
|
|
153
159
|
#########################
|
154
160
|
|
155
161
|
##
|
156
|
-
# @!method create_collection(name: nil, description: nil
|
162
|
+
# @!method create_collection(name: nil, description: nil)
|
157
163
|
# Create a collection.
|
158
164
|
# Create a collection that can be used to store images.
|
159
165
|
#
|
@@ -165,9 +171,8 @@ module IBMWatson
|
|
165
171
|
# @param name [String] The name of the collection. The name can contain alphanumeric, underscore, hyphen,
|
166
172
|
# and dot characters. It cannot begin with the reserved prefix `sys-`.
|
167
173
|
# @param description [String] The description of the collection.
|
168
|
-
# @param training_status [TrainingStatus] Training status information for the collection.
|
169
174
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
170
|
-
def create_collection(name: nil, description: nil
|
175
|
+
def create_collection(name: nil, description: nil)
|
171
176
|
raise ArgumentError.new("version must be provided") if version.nil?
|
172
177
|
|
173
178
|
headers = {
|
@@ -181,8 +186,7 @@ module IBMWatson
|
|
181
186
|
|
182
187
|
data = {
|
183
188
|
"name" => name,
|
184
|
-
"description" => description
|
185
|
-
"training_status" => training_status
|
189
|
+
"description" => description
|
186
190
|
}
|
187
191
|
|
188
192
|
method_url = "/v4/collections"
|
@@ -260,7 +264,7 @@ module IBMWatson
|
|
260
264
|
end
|
261
265
|
|
262
266
|
##
|
263
|
-
# @!method update_collection(collection_id:, name: nil, description: nil
|
267
|
+
# @!method update_collection(collection_id:, name: nil, description: nil)
|
264
268
|
# Update a collection.
|
265
269
|
# Update the name or description of a collection.
|
266
270
|
#
|
@@ -270,9 +274,8 @@ module IBMWatson
|
|
270
274
|
# @param name [String] The name of the collection. The name can contain alphanumeric, underscore, hyphen,
|
271
275
|
# and dot characters. It cannot begin with the reserved prefix `sys-`.
|
272
276
|
# @param description [String] The description of the collection.
|
273
|
-
# @param training_status [TrainingStatus] Training status information for the collection.
|
274
277
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
275
|
-
def update_collection(collection_id:, name: nil, description: nil
|
278
|
+
def update_collection(collection_id:, name: nil, description: nil)
|
276
279
|
raise ArgumentError.new("version must be provided") if version.nil?
|
277
280
|
|
278
281
|
raise ArgumentError.new("collection_id must be provided") if collection_id.nil?
|
@@ -288,8 +291,7 @@ module IBMWatson
|
|
288
291
|
|
289
292
|
data = {
|
290
293
|
"name" => name,
|
291
|
-
"description" => description
|
292
|
-
"training_status" => training_status
|
294
|
+
"description" => description
|
293
295
|
}
|
294
296
|
|
295
297
|
method_url = "/v4/collections/%s" % [ERB::Util.url_encode(collection_id)]
|
@@ -246,6 +246,20 @@ if !ENV["DISCOVERY_V2_APIKEY"].nil?
|
|
246
246
|
)
|
247
247
|
assert(service_response.nil?)
|
248
248
|
end
|
249
|
+
|
250
|
+
def test_analyze_document
|
251
|
+
skip "CPD only. Do not run on premium"
|
252
|
+
analyze_data = File.open(Dir.getwd + "/resources/problem.json")
|
253
|
+
|
254
|
+
service_response = service.analyze_document(
|
255
|
+
project_id: @project_id,
|
256
|
+
collection_id: @collection_id,
|
257
|
+
file: analyze_data,
|
258
|
+
file_content_type: "application/json"
|
259
|
+
)
|
260
|
+
assert((200..299).cover?(service_response.status))
|
261
|
+
refute(service_response.nil?)
|
262
|
+
end
|
249
263
|
end
|
250
264
|
else
|
251
265
|
class DiscoveryV2Test < Minitest::Test
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_watson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Nussbaum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -342,11 +342,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
342
342
|
version: '2.3'
|
343
343
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
344
344
|
requirements:
|
345
|
-
- - "
|
345
|
+
- - ">="
|
346
346
|
- !ruby/object:Gem::Version
|
347
|
-
version:
|
347
|
+
version: '0'
|
348
348
|
requirements: []
|
349
|
-
rubygems_version: 3.
|
349
|
+
rubygems_version: 3.1.5
|
350
350
|
signing_key:
|
351
351
|
specification_version: 4
|
352
352
|
summary: Official client library to use the IBM Watson Services
|