ibm_watson 2.1.1 → 2.2.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 +16 -39
- data/lib/ibm_watson/assistant_v1.rb +5 -4
- data/lib/ibm_watson/assistant_v2.rb +3 -3
- data/lib/ibm_watson/discovery_v1.rb +7 -14
- data/lib/ibm_watson/discovery_v2.rb +109 -108
- data/lib/ibm_watson/language_translator_v3.rb +2 -2
- data/lib/ibm_watson/natural_language_understanding_v1.rb +12 -14
- data/lib/ibm_watson/speech_to_text_v1.rb +581 -402
- data/lib/ibm_watson/text_to_speech_v1.rb +87 -166
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson.rb +0 -6
- metadata +2 -20
- data/lib/ibm_watson/compare_comply_v1.rb +0 -683
- data/lib/ibm_watson/natural_language_classifier_v1.rb +0 -258
- data/lib/ibm_watson/personality_insights_v3.rb +0 -223
- data/lib/ibm_watson/tone_analyzer_v3.rb +0 -230
- data/lib/ibm_watson/visual_recognition_v3.rb +0 -517
- data/lib/ibm_watson/visual_recognition_v4.rb +0 -930
- data/test/integration/test_compare_comply_v1.rb +0 -105
- data/test/integration/test_natural_language_classifier_v1.rb +0 -80
- data/test/integration/test_personality_insights_v3.rb +0 -81
- data/test/integration/test_tone_analyzer_v3.rb +0 -66
- data/test/integration/test_visual_recognition_v3.rb +0 -68
- data/test/integration/test_visual_recognition_v4.rb +0 -87
- data/test/unit/test_compare_comply_v1.rb +0 -232
- data/test/unit/test_natural_language_classifier_v1.rb +0 -191
- data/test/unit/test_personality_insights_v3.rb +0 -192
- data/test/unit/test_tone_analyzer_v3.rb +0 -217
- data/test/unit/test_visual_recognition_v3.rb +0 -300
- data/test/unit/test_visual_recognition_v4.rb +0 -422
@@ -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.38.0-07189efd-20210827-205025
|
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
|
@@ -42,7 +42,7 @@ module IBMWatson
|
|
42
42
|
#
|
43
43
|
# @param args [Hash] The args to initialize with
|
44
44
|
# @option args version [String] Release date of the version of the API you want to use. Specify dates in
|
45
|
-
# YYYY-MM-DD format. The current version is `
|
45
|
+
# YYYY-MM-DD format. The current version is `2020-08-30`.
|
46
46
|
# @option args service_url [String] The base service URL to use when contacting the service.
|
47
47
|
# The base service_url may differ between IBM Cloud regions.
|
48
48
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
@@ -73,8 +73,8 @@ module IBMWatson
|
|
73
73
|
# @!method list_collections(project_id:)
|
74
74
|
# List collections.
|
75
75
|
# Lists existing collections for the specified project.
|
76
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
77
|
-
#
|
76
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
77
|
+
# Deploy* page in Discovery.
|
78
78
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
79
79
|
def list_collections(project_id:)
|
80
80
|
raise ArgumentError.new("project_id must be provided") if project_id.nil?
|
@@ -106,8 +106,8 @@ module IBMWatson
|
|
106
106
|
# @!method create_collection(project_id:, name:, description: nil, language: nil, enrichments: nil)
|
107
107
|
# Create a collection.
|
108
108
|
# Create a new collection in the specified project.
|
109
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
110
|
-
#
|
109
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
110
|
+
# Deploy* page in Discovery.
|
111
111
|
# @param name [String] The name of the collection.
|
112
112
|
# @param description [String] A description of the collection.
|
113
113
|
# @param language [String] The language of the collection.
|
@@ -153,8 +153,8 @@ module IBMWatson
|
|
153
153
|
# @!method get_collection(project_id:, collection_id:)
|
154
154
|
# Get collection.
|
155
155
|
# Get details about the specified collection.
|
156
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
157
|
-
#
|
156
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
157
|
+
# Deploy* page in Discovery.
|
158
158
|
# @param collection_id [String] The ID of the collection.
|
159
159
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
160
160
|
def get_collection(project_id:, collection_id:)
|
@@ -189,8 +189,8 @@ module IBMWatson
|
|
189
189
|
# @!method update_collection(project_id:, collection_id:, name: nil, description: nil, enrichments: nil)
|
190
190
|
# Update a collection.
|
191
191
|
# Updates the specified collection's name, description, and enrichments.
|
192
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
193
|
-
#
|
192
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
193
|
+
# Deploy* page in Discovery.
|
194
194
|
# @param collection_id [String] The ID of the collection.
|
195
195
|
# @param name [String] The name of the collection.
|
196
196
|
# @param description [String] A description of the collection.
|
@@ -236,8 +236,8 @@ module IBMWatson
|
|
236
236
|
# Delete a collection.
|
237
237
|
# Deletes the specified collection from the project. All documents stored in the
|
238
238
|
# specified collection and not shared is also deleted.
|
239
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
240
|
-
#
|
239
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
240
|
+
# Deploy* page in Discovery.
|
241
241
|
# @param collection_id [String] The ID of the collection.
|
242
242
|
# @return [nil]
|
243
243
|
def delete_collection(project_id:, collection_id:)
|
@@ -282,8 +282,8 @@ module IBMWatson
|
|
282
282
|
# for an overview of the standard default settings, and see [the Projects API
|
283
283
|
# documentation](#create-project) for details about how to set custom default query
|
284
284
|
# settings.
|
285
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
286
|
-
#
|
285
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
286
|
+
# Deploy* page in Discovery.
|
287
287
|
# @param collection_ids [Array[String]] A comma-separated list of collection IDs to be queried against.
|
288
288
|
# @param filter [String] A cacheable query that excludes documents that don't mention the query content.
|
289
289
|
# Filter searches are better for metadata-type searches and for assessing the
|
@@ -297,15 +297,14 @@ module IBMWatson
|
|
297
297
|
# filters. Useful for applications to build lists, tables, and time series. For a
|
298
298
|
# full list of possible aggregations, see the Query reference.
|
299
299
|
# @param count [Fixnum] Number of results to return.
|
300
|
-
# @param _return [Array[String]] A list of the fields in the document hierarchy to return. If this parameter
|
301
|
-
#
|
300
|
+
# @param _return [Array[String]] A list of the fields in the document hierarchy to return. If this parameter is an
|
301
|
+
# empty list, then all fields are returned.
|
302
302
|
# @param offset [Fixnum] The number of query results to skip at the beginning. For example, if the total
|
303
303
|
# number of results that are returned is 10 and the offset is 8, it returns the last
|
304
304
|
# two results.
|
305
305
|
# @param sort [String] A comma-separated list of fields in the document to sort on. You can optionally
|
306
306
|
# specify a sort direction by prefixing the field with `-` for descending or `+` for
|
307
|
-
# ascending. Ascending is the default sort direction if no prefix is specified.
|
308
|
-
# parameter cannot be used in the same query as the **bias** parameter.
|
307
|
+
# ascending. Ascending is the default sort direction if no prefix is specified.
|
309
308
|
# @param highlight [Boolean] When `true`, a highlight field is returned for each result which contains the
|
310
309
|
# fields which match the query with `<em></em>` tags around the matching query
|
311
310
|
# terms.
|
@@ -313,7 +312,7 @@ module IBMWatson
|
|
313
312
|
# **natural_language_query** parameter is spell checked. The most likely correction
|
314
313
|
# is returned in the **suggested_query** field of the response (if one exists).
|
315
314
|
# @param table_results [QueryLargeTableResults] Configuration for table retrieval.
|
316
|
-
# @param suggested_refinements [QueryLargeSuggestedRefinements] Configuration for suggested refinements.
|
315
|
+
# @param suggested_refinements [QueryLargeSuggestedRefinements] Configuration for suggested refinements. Available with Premium plans only.
|
317
316
|
# @param passages [QueryLargePassages] Configuration for passage retrieval.
|
318
317
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
319
318
|
def query(project_id:, collection_ids: nil, filter: nil, query: nil, natural_language_query: nil, aggregation: nil, count: nil, _return: nil, offset: nil, sort: nil, highlight: nil, spelling_suggestions: nil, table_results: nil, suggested_refinements: nil, passages: nil)
|
@@ -364,10 +363,10 @@ module IBMWatson
|
|
364
363
|
# @!method get_autocompletion(project_id:, prefix:, collection_ids: nil, field: nil, count: nil)
|
365
364
|
# Get Autocomplete Suggestions.
|
366
365
|
# Returns completion query suggestions for the specified prefix.
|
367
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
368
|
-
#
|
366
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
367
|
+
# Deploy* page in Discovery.
|
369
368
|
# @param prefix [String] The prefix to use for autocompletion. For example, the prefix `Ho` could
|
370
|
-
# autocomplete to `
|
369
|
+
# autocomplete to `hot`, `housing`, or `how`.
|
371
370
|
# @param collection_ids [Array[String]] Comma separated list of the collection IDs. If this parameter is not specified,
|
372
371
|
# all collections in the project are used.
|
373
372
|
# @param field [String] The field in the result documents that autocompletion suggestions are identified
|
@@ -412,8 +411,8 @@ module IBMWatson
|
|
412
411
|
# Query collection notices.
|
413
412
|
# Finds collection-level notices (errors and warnings) that are generated when
|
414
413
|
# documents are ingested.
|
415
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
416
|
-
#
|
414
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
415
|
+
# Deploy* page in Discovery.
|
417
416
|
# @param collection_id [String] The ID of the collection.
|
418
417
|
# @param filter [String] A cacheable query that excludes documents that don't mention the query content.
|
419
418
|
# Filter searches are better for metadata-type searches and for assessing the
|
@@ -467,8 +466,8 @@ module IBMWatson
|
|
467
466
|
# Query project notices.
|
468
467
|
# Finds project-level notices (errors and warnings). Currently, project-level
|
469
468
|
# notices are generated by relevancy training.
|
470
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
471
|
-
#
|
469
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
470
|
+
# Deploy* page in Discovery.
|
472
471
|
# @param filter [String] A cacheable query that excludes documents that don't mention the query content.
|
473
472
|
# Filter searches are better for metadata-type searches and for assessing the
|
474
473
|
# concepts in the data set.
|
@@ -519,8 +518,8 @@ module IBMWatson
|
|
519
518
|
# List fields.
|
520
519
|
# Gets a list of the unique fields (and their types) stored in the the specified
|
521
520
|
# collections.
|
522
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
523
|
-
#
|
521
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
522
|
+
# Deploy* page in Discovery.
|
524
523
|
# @param collection_ids [Array[String]] Comma separated list of the collection IDs. If this parameter is not specified,
|
525
524
|
# all collections in the project are used.
|
526
525
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -559,8 +558,8 @@ module IBMWatson
|
|
559
558
|
# @!method get_component_settings(project_id:)
|
560
559
|
# List component settings.
|
561
560
|
# Returns default configuration settings for components.
|
562
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
563
|
-
#
|
561
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
562
|
+
# Deploy* page in Discovery.
|
564
563
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
565
564
|
def get_component_settings(project_id:)
|
566
565
|
raise ArgumentError.new("project_id must be provided") if project_id.nil?
|
@@ -596,44 +595,42 @@ module IBMWatson
|
|
596
595
|
# Add a document.
|
597
596
|
# Add a document to a collection with optional metadata.
|
598
597
|
#
|
599
|
-
#
|
598
|
+
# Returns immediately after the system has accepted the document for processing.
|
600
599
|
#
|
601
600
|
# * The user must provide document content, metadata, or both. If the request is
|
602
601
|
# missing both document content and metadata, it is rejected.
|
603
602
|
#
|
604
|
-
# *
|
605
|
-
#
|
606
|
-
#
|
607
|
-
#
|
608
|
-
# document's media type.
|
603
|
+
# * You can set the **Content-Type** parameter on the **file** part to indicate
|
604
|
+
# the media type of the document. If the **Content-Type** parameter is missing or is
|
605
|
+
# one of the generic media types (for example, `application/octet-stream`), then the
|
606
|
+
# service attempts to automatically detect the document's media type.
|
609
607
|
#
|
610
|
-
# * The following field names are reserved and
|
611
|
-
#
|
612
|
-
#
|
608
|
+
# * The following field names are reserved and are filtered out if present after
|
609
|
+
# normalization: `id`, `score`, `highlight`, and any field with the prefix of: `_`,
|
610
|
+
# `+`, or `-`
|
613
611
|
#
|
614
612
|
# * Fields with empty name values after normalization are filtered out before
|
615
613
|
# indexing.
|
616
614
|
#
|
617
|
-
# * Fields
|
615
|
+
# * Fields that contain the following characters after normalization are filtered
|
618
616
|
# out before indexing: `#` and `,`
|
619
617
|
#
|
620
|
-
# If the document is uploaded to a collection that
|
621
|
-
#
|
622
|
-
#
|
618
|
+
# If the document is uploaded to a collection that shares its data with another
|
619
|
+
# collection, the **X-Watson-Discovery-Force** header must be set to `true`.
|
623
620
|
#
|
624
|
-
#
|
625
|
-
#
|
621
|
+
# **Note:** You can assign an ID to a document that you add by appending the ID to
|
622
|
+
# the endpoint
|
623
|
+
# (`/v2/projects/{project_id}/collections/{collection_id}/documents/{document_id}`).
|
624
|
+
# If a document already exists with the specified ID, it is replaced.
|
626
625
|
#
|
627
|
-
# **Note:** This operation
|
628
|
-
#
|
629
|
-
#
|
630
|
-
#
|
631
|
-
# Discovery administrative tooling.
|
626
|
+
# **Note:** This operation works with a file upload collection. It cannot be used to
|
627
|
+
# modify a collection that crawls an external data source.
|
628
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
629
|
+
# Deploy* page in Discovery.
|
632
630
|
# @param collection_id [String] The ID of the collection.
|
633
|
-
# @param file [File] The content of the document to ingest.
|
634
|
-
#
|
635
|
-
#
|
636
|
-
# rejected.
|
631
|
+
# @param file [File] The content of the document to ingest. For maximum supported file size limits, see
|
632
|
+
# [the
|
633
|
+
# documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
|
637
634
|
# @param filename [String] The filename for file.
|
638
635
|
# @param file_content_type [String] The content type of file.
|
639
636
|
# @param metadata [String] The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB
|
@@ -695,7 +692,7 @@ module IBMWatson
|
|
695
692
|
# Replace an existing document or add a document with a specified **document_id**.
|
696
693
|
# Starts ingesting a document with optional metadata.
|
697
694
|
#
|
698
|
-
# If the document is uploaded to a collection that
|
695
|
+
# If the document is uploaded to a collection that shares its data with another
|
699
696
|
# collection, the **X-Watson-Discovery-Force** header must be set to `true`.
|
700
697
|
#
|
701
698
|
# **Note:** When uploading a new document with this method it automatically replaces
|
@@ -705,16 +702,15 @@ module IBMWatson
|
|
705
702
|
# uploads. It cannot be used to modify a collection that connects to an external
|
706
703
|
# source such as Microsoft SharePoint.
|
707
704
|
#
|
708
|
-
# **Note:** If an uploaded document is segmented, all segments
|
709
|
-
#
|
710
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
711
|
-
#
|
705
|
+
# **Note:** If an uploaded document is segmented, all segments are overwritten, even
|
706
|
+
# if the updated version of the document has fewer segments.
|
707
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
708
|
+
# Deploy* page in Discovery.
|
712
709
|
# @param collection_id [String] The ID of the collection.
|
713
710
|
# @param document_id [String] The ID of the document.
|
714
|
-
# @param file [File] The content of the document to ingest.
|
715
|
-
#
|
716
|
-
#
|
717
|
-
# rejected.
|
711
|
+
# @param file [File] The content of the document to ingest. For maximum supported file size limits, see
|
712
|
+
# [the
|
713
|
+
# documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
|
718
714
|
# @param filename [String] The filename for file.
|
719
715
|
# @param file_content_type [String] The content type of file.
|
720
716
|
# @param metadata [String] The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB
|
@@ -785,8 +781,8 @@ module IBMWatson
|
|
785
781
|
#
|
786
782
|
# **Note:** Segments of an uploaded document cannot be deleted individually. Delete
|
787
783
|
# all segments by deleting using the `parent_document_id` of a segment result.
|
788
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
789
|
-
#
|
784
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
785
|
+
# Deploy* page in Discovery.
|
790
786
|
# @param collection_id [String] The ID of the collection.
|
791
787
|
# @param document_id [String] The ID of the document.
|
792
788
|
# @param x_watson_discovery_force [Boolean] When `true`, the uploaded document is added to the collection even if the data for
|
@@ -830,8 +826,8 @@ module IBMWatson
|
|
830
826
|
# @!method list_training_queries(project_id:)
|
831
827
|
# List training queries.
|
832
828
|
# List the training queries for the specified project.
|
833
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
834
|
-
#
|
829
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
830
|
+
# Deploy* page in Discovery.
|
835
831
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
836
832
|
def list_training_queries(project_id:)
|
837
833
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -863,8 +859,8 @@ module IBMWatson
|
|
863
859
|
# @!method delete_training_queries(project_id:)
|
864
860
|
# Delete training queries.
|
865
861
|
# Removes all training queries for the specified project.
|
866
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
867
|
-
#
|
862
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
863
|
+
# Deploy* page in Discovery.
|
868
864
|
# @return [nil]
|
869
865
|
def delete_training_queries(project_id:)
|
870
866
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -897,8 +893,8 @@ module IBMWatson
|
|
897
893
|
# Create training query.
|
898
894
|
# Add a query to the training data for this project. The query can contain a filter
|
899
895
|
# and natural language query.
|
900
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
901
|
-
#
|
896
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
897
|
+
# Deploy* page in Discovery.
|
902
898
|
# @param natural_language_query [String] The natural text query for the training query.
|
903
899
|
# @param examples [Array[TrainingExample]] Array of training examples.
|
904
900
|
# @param filter [String] The filter used on the collection before the **natural_language_query** is
|
@@ -946,8 +942,8 @@ module IBMWatson
|
|
946
942
|
# Get a training data query.
|
947
943
|
# Get details for a specific training data query, including the query string and all
|
948
944
|
# examples.
|
949
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
950
|
-
#
|
945
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
946
|
+
# Deploy* page in Discovery.
|
951
947
|
# @param query_id [String] The ID of the query used for training.
|
952
948
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
953
949
|
def get_training_query(project_id:, query_id:)
|
@@ -982,8 +978,8 @@ module IBMWatson
|
|
982
978
|
# @!method update_training_query(project_id:, query_id:, natural_language_query:, examples:, filter: nil)
|
983
979
|
# Update a training query.
|
984
980
|
# Updates an existing training query and it's examples.
|
985
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
986
|
-
#
|
981
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
982
|
+
# Deploy* page in Discovery.
|
987
983
|
# @param query_id [String] The ID of the query used for training.
|
988
984
|
# @param natural_language_query [String] The natural text query for the training query.
|
989
985
|
# @param examples [Array[TrainingExample]] Array of training examples.
|
@@ -1034,8 +1030,8 @@ module IBMWatson
|
|
1034
1030
|
# Delete a training data query.
|
1035
1031
|
# Removes details from a training data query, including the query string and all
|
1036
1032
|
# examples.
|
1037
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1038
|
-
#
|
1033
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1034
|
+
# Deploy* page in Discovery.
|
1039
1035
|
# @param query_id [String] The ID of the query used for training.
|
1040
1036
|
# @return [nil]
|
1041
1037
|
def delete_training_query(project_id:, query_id:)
|
@@ -1072,21 +1068,18 @@ module IBMWatson
|
|
1072
1068
|
##
|
1073
1069
|
# @!method analyze_document(project_id:, collection_id:, file: nil, filename: nil, file_content_type: nil, metadata: nil)
|
1074
1070
|
# Analyze a Document.
|
1075
|
-
# Process a document
|
1076
|
-
# realtime use.
|
1071
|
+
# Process a document and return it for realtime use. Supports JSON files only.
|
1077
1072
|
#
|
1078
|
-
#
|
1079
|
-
# collection.
|
1073
|
+
# The document is processed according to the collection's configuration settings but
|
1074
|
+
# is not stored in the collection.
|
1080
1075
|
#
|
1081
|
-
# **Note:** This method is
|
1082
|
-
#
|
1083
|
-
#
|
1084
|
-
# Discovery administrative tooling.
|
1076
|
+
# **Note:** This method is supported on installed instances of Discovery only.
|
1077
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1078
|
+
# Deploy* page in Discovery.
|
1085
1079
|
# @param collection_id [String] The ID of the collection.
|
1086
|
-
# @param file [File] The content of the document to ingest.
|
1087
|
-
#
|
1088
|
-
#
|
1089
|
-
# rejected.
|
1080
|
+
# @param file [File] The content of the document to ingest. For maximum supported file size limits, see
|
1081
|
+
# [the
|
1082
|
+
# documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
|
1090
1083
|
# @param filename [String] The filename for file.
|
1091
1084
|
# @param file_content_type [String] The content type of file.
|
1092
1085
|
# @param metadata [String] The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB
|
@@ -1145,9 +1138,11 @@ module IBMWatson
|
|
1145
1138
|
##
|
1146
1139
|
# @!method list_enrichments(project_id:)
|
1147
1140
|
# List Enrichments.
|
1148
|
-
#
|
1149
|
-
#
|
1150
|
-
#
|
1141
|
+
# Lists the enrichments available to this project. The *Part of Speech* and
|
1142
|
+
# *Sentiment of Phrases* enrichments might be listed, but are reserved for internal
|
1143
|
+
# use only.
|
1144
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1145
|
+
# Deploy* page in Discovery.
|
1151
1146
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1152
1147
|
def list_enrichments(project_id:)
|
1153
1148
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -1178,9 +1173,9 @@ module IBMWatson
|
|
1178
1173
|
##
|
1179
1174
|
# @!method create_enrichment(project_id:, enrichment:, file: nil)
|
1180
1175
|
# Create an enrichment.
|
1181
|
-
# Create an enrichment for use with the specified project
|
1182
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1183
|
-
#
|
1176
|
+
# Create an enrichment for use with the specified project.
|
1177
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1178
|
+
# Deploy* page in Discovery.
|
1184
1179
|
# @param enrichment [CreateEnrichment] Information about a specific enrichment.
|
1185
1180
|
# @param file [File] The enrichment file to upload.
|
1186
1181
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1228,8 +1223,8 @@ module IBMWatson
|
|
1228
1223
|
# @!method get_enrichment(project_id:, enrichment_id:)
|
1229
1224
|
# Get enrichment.
|
1230
1225
|
# Get details about a specific enrichment.
|
1231
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1232
|
-
#
|
1226
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1227
|
+
# Deploy* page in Discovery.
|
1233
1228
|
# @param enrichment_id [String] The ID of the enrichment.
|
1234
1229
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1235
1230
|
def get_enrichment(project_id:, enrichment_id:)
|
@@ -1264,8 +1259,8 @@ module IBMWatson
|
|
1264
1259
|
# @!method update_enrichment(project_id:, enrichment_id:, name:, description: nil)
|
1265
1260
|
# Update an enrichment.
|
1266
1261
|
# Updates an existing enrichment's name and description.
|
1267
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1268
|
-
#
|
1262
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1263
|
+
# Deploy* page in Discovery.
|
1269
1264
|
# @param enrichment_id [String] The ID of the enrichment.
|
1270
1265
|
# @param name [String] A new name for the enrichment.
|
1271
1266
|
# @param description [String] A new description for the enrichment.
|
@@ -1312,8 +1307,8 @@ module IBMWatson
|
|
1312
1307
|
# Deletes an existing enrichment from the specified project.
|
1313
1308
|
#
|
1314
1309
|
# **Note:** Only enrichments that have been manually created can be deleted.
|
1315
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1316
|
-
#
|
1310
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1311
|
+
# Deploy* page in Discovery.
|
1317
1312
|
# @param enrichment_id [String] The ID of the enrichment.
|
1318
1313
|
# @return [nil]
|
1319
1314
|
def delete_enrichment(project_id:, enrichment_id:)
|
@@ -1381,7 +1376,13 @@ module IBMWatson
|
|
1381
1376
|
# Create a Project.
|
1382
1377
|
# Create a new project for this instance.
|
1383
1378
|
# @param name [String] The human readable name of this project.
|
1384
|
-
# @param type [String] The
|
1379
|
+
# @param type [String] The type of project.
|
1380
|
+
#
|
1381
|
+
# The `content_intelligence` type is a *Document Retrieval for Contracts* project
|
1382
|
+
# and the `other` type is a *Custom* project.
|
1383
|
+
#
|
1384
|
+
# The `content_mining` and `content_intelligence` types are available with Premium
|
1385
|
+
# plan managed deployments and installed deployments only.
|
1385
1386
|
# @param default_query_parameters [DefaultQueryParams] Default query parameters for this project.
|
1386
1387
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1387
1388
|
def create_project(name:, type:, default_query_parameters: nil)
|
@@ -1423,8 +1424,8 @@ module IBMWatson
|
|
1423
1424
|
# @!method get_project(project_id:)
|
1424
1425
|
# Get project.
|
1425
1426
|
# Get details on the specified project.
|
1426
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1427
|
-
#
|
1427
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1428
|
+
# Deploy* page in Discovery.
|
1428
1429
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1429
1430
|
def get_project(project_id:)
|
1430
1431
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -1456,8 +1457,8 @@ module IBMWatson
|
|
1456
1457
|
# @!method update_project(project_id:, name: nil)
|
1457
1458
|
# Update a project.
|
1458
1459
|
# Update the specified project's name.
|
1459
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1460
|
-
#
|
1460
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1461
|
+
# Deploy* page in Discovery.
|
1461
1462
|
# @param name [String] The new name to give this project.
|
1462
1463
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1463
1464
|
def update_project(project_id:, name: nil)
|
@@ -1498,8 +1499,8 @@ module IBMWatson
|
|
1498
1499
|
#
|
1499
1500
|
# **Important:** Deleting a project deletes everything that is part of the specified
|
1500
1501
|
# project, including all collections.
|
1501
|
-
# @param project_id [String] The ID of the project. This information can be found from the
|
1502
|
-
#
|
1502
|
+
# @param project_id [String] The ID of the project. This information can be found from the *Integrate and
|
1503
|
+
# Deploy* page in Discovery.
|
1503
1504
|
# @return [nil]
|
1504
1505
|
def delete_project(project_id:)
|
1505
1506
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# (C) Copyright IBM Corp. 2018,
|
3
|
+
# (C) Copyright IBM Corp. 2018, 2022.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -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.38.0-07189efd-20210827-205025
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# (C) Copyright IBM Corp. 2018,
|
3
|
+
# (C) Copyright IBM Corp. 2018, 2022.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -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.38.0-07189efd-20210827-205025
|
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
|
@@ -46,7 +46,7 @@ module IBMWatson
|
|
46
46
|
#
|
47
47
|
# @param args [Hash] The args to initialize with
|
48
48
|
# @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
|
49
|
-
# format. The current version is `2021-
|
49
|
+
# format. The current version is `2021-08-01`.
|
50
50
|
# @option args service_url [String] The base service URL to use when contacting the service.
|
51
51
|
# The base service_url may differ between IBM Cloud regions.
|
52
52
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
@@ -684,9 +684,9 @@ module IBMWatson
|
|
684
684
|
##
|
685
685
|
# @!method create_classifications_model(language:, training_data:, training_data_content_type: nil, name: nil, description: nil, model_version: nil, workspace_id: nil, version_description: nil)
|
686
686
|
# Create classifications model.
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
687
|
+
# Creates a custom classifications model by uploading training data and associated
|
688
|
+
# metadata. The model begins the training and deploying process and is ready to use
|
689
|
+
# when the `status` is `available`.
|
690
690
|
# @param language [String] The 2-letter language code of this model.
|
691
691
|
# @param training_data [File] Training data in JSON format. For more information, see [Classifications training
|
692
692
|
# data
|
@@ -750,8 +750,7 @@ module IBMWatson
|
|
750
750
|
##
|
751
751
|
# @!method list_classifications_models
|
752
752
|
# List classifications models.
|
753
|
-
#
|
754
|
-
# instance.
|
753
|
+
# Returns all custom classifications models associated with this service instance.
|
755
754
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
756
755
|
def list_classifications_models
|
757
756
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -780,7 +779,7 @@ module IBMWatson
|
|
780
779
|
##
|
781
780
|
# @!method get_classifications_model(model_id:)
|
782
781
|
# Get classifications model details.
|
783
|
-
#
|
782
|
+
# Returns the status of the classifications model with the given model ID.
|
784
783
|
# @param model_id [String] ID of the model.
|
785
784
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
786
785
|
def get_classifications_model(model_id:)
|
@@ -812,8 +811,8 @@ module IBMWatson
|
|
812
811
|
##
|
813
812
|
# @!method update_classifications_model(model_id:, language:, training_data:, training_data_content_type: nil, name: nil, description: nil, model_version: nil, workspace_id: nil, version_description: nil)
|
814
813
|
# Update classifications model.
|
815
|
-
#
|
816
|
-
#
|
814
|
+
# Overwrites the training data associated with this custom classifications model and
|
815
|
+
# retrains the model. The new model replaces the current deployment.
|
817
816
|
# @param model_id [String] ID of the model.
|
818
817
|
# @param language [String] The 2-letter language code of this model.
|
819
818
|
# @param training_data [File] Training data in JSON format. For more information, see [Classifications training
|
@@ -880,9 +879,8 @@ module IBMWatson
|
|
880
879
|
##
|
881
880
|
# @!method delete_classifications_model(model_id:)
|
882
881
|
# Delete classifications model.
|
883
|
-
#
|
884
|
-
#
|
885
|
-
# artifacts.
|
882
|
+
# Un-deploys the custom classifications model with the given model ID and deletes
|
883
|
+
# all associated customer data, including any training data or binary artifacts.
|
886
884
|
# @param model_id [String] ID of the model.
|
887
885
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
888
886
|
def delete_classifications_model(model_id:)
|