Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.2.0 #678

Merged
merged 17 commits into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions examples/compare_comply_v1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding: utf-8
from __future__ import print_function
import json
import os
from ibm_watson import CompareComplyV1

# If service instance provides API key authentication
compare_comply = CompareComplyV1(
version='2018-03-23',
## url is optional, and defaults to the URL below. Use the correct URL for your region.
url='https://gateway.watsonplatform.net/compare-comply/api',
iam_apikey='YOUR APIKEY')

# compare_comply = CompareComplyV1(
# version='2018-03-23',
# ## url is optional, and defaults to the URL below. Use the correct URL for your region.
# # url='https://gateway.watsonplatform.net/compare-comply/api',
# username='YOUR SERVICE USERNAME',
# password='YOUR SERVICE PASSWORD')

print('Convert to HTML')
contract = os.path.abspath('resources/contract_A.pdf')
with open(contract, 'rb') as file:
result = compare_comply.convert_to_html(file).get_result()
print(json.dumps(result, indent=2))

print('Classify elements')
contract = os.path.abspath('resources/contract_A.pdf')
with open(contract, 'rb') as file:
result = compare_comply.classify_elements(file, 'application/pdf').get_result()
print(json.dumps(result, indent=2))

print('Extract tables')
table = os.path.abspath('resources/contract_A.pdf')
with open(table, 'rb') as file:
result = compare_comply.extract_tables(file).get_result()
print(json.dumps(result, indent=2))
13 changes: 8 additions & 5 deletions ibm_watson/assistant_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def message(self,
Get response to user input.

Send user input to a workspace and receive a response.
**Note:** For most applications, there are significant advantages to using the v2
runtime API instead. These advantages include ease of deployment, automatic state
management, versioning, and search capabilities. For more information, see the
[documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
There is no rate limit for this operation.

:param str workspace_id: Unique identifier of the workspace.
Expand Down Expand Up @@ -6773,9 +6777,9 @@ class RuntimeEntity(object):
:attr str entity: An entity detected in the input.
:attr list[int] location: An array of zero-based character offsets that indicate where
the detected entity values begin and end in the input text.
:attr str value: The term in the input text that was recognized as an entity value.
:attr str value: The entity value that was recognized in the user input.
:attr float confidence: (optional) A decimal percentage that represents Watson's
confidence in the entity.
confidence in the recognized entity.
:attr dict metadata: (optional) Any metadata for the entity.
:attr list[CaptureGroup] groups: (optional) The recognized capture groups for the
entity, as defined by the entity pattern.
Expand All @@ -6795,10 +6799,9 @@ def __init__(self,
:param str entity: An entity detected in the input.
:param list[int] location: An array of zero-based character offsets that indicate
where the detected entity values begin and end in the input text.
:param str value: The term in the input text that was recognized as an entity
value.
:param str value: The entity value that was recognized in the user input.
:param float confidence: (optional) A decimal percentage that represents Watson's
confidence in the entity.
confidence in the recognized entity.
:param dict metadata: (optional) Any metadata for the entity.
:param list[CaptureGroup] groups: (optional) The recognized capture groups for the
entity, as defined by the entity pattern.
Expand Down
Loading