ibm_watson.compare_comply_v1 module

IBM Watson™ Compare and Comply analyzes governing documents to provide details about critical aspects of the documents.

class CompareComplyV1(version: str, authenticator: ibm_cloud_sdk_core.authenticators.authenticator.Authenticator = None, service_name: str = 'compare_comply')[source]

Bases: ibm_cloud_sdk_core.base_service.BaseService

The Compare Comply V1 service.

DEFAULT_SERVICE_URL = 'https://api.us-south.compare-comply.watson.cloud.ibm.com'
DEFAULT_SERVICE_NAME = 'compare_comply'
convert_to_html(file: BinaryIO, *, file_content_type: str = None, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Convert document to HTML.

Converts a document to HTML.

Parameters
  • file (TextIO) – The document to convert.

  • file_content_type (str) – (optional) The content type of file.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

classify_elements(file: BinaryIO, *, file_content_type: str = None, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Classify the elements of a document.

Analyzes the structural and semantic elements of a document.

Parameters
  • file (TextIO) – The document to classify.

  • file_content_type (str) – (optional) The content type of file.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

extract_tables(file: BinaryIO, *, file_content_type: str = None, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Extract a document’s tables.

Analyzes the tables in a document.

Parameters
  • file (TextIO) – The document on which to run table extraction.

  • file_content_type (str) – (optional) The content type of file.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

compare_documents(file_1: BinaryIO, file_2: BinaryIO, *, file_1_content_type: str = None, file_2_content_type: str = None, file_1_label: str = None, file_2_label: str = None, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Compare two documents.

Compares two input documents. Documents must be in the same format.

Parameters
  • file_1 (TextIO) – The first document to compare.

  • file_2 (TextIO) – The second document to compare.

  • file_1_content_type (str) – (optional) The content type of file_1.

  • file_2_content_type (str) – (optional) The content type of file_2.

  • file_1_label (str) – (optional) A text label for the first document.

  • file_2_label (str) – (optional) A text label for the second document.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

add_feedback(feedback_data: ibm_watson.compare_comply_v1.FeedbackDataInput, *, user_id: str = None, comment: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Add feedback.

Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. Important: Feedback is not immediately incorporated into the training model, nor is it guaranteed to be incorporated at a later date. Instead, submitted feedback is used to suggest future updates to the training model.

Parameters
  • feedback_data (FeedbackDataInput) – Feedback data for submission.

  • user_id (str) – (optional) An optional string identifying the user.

  • comment (str) – (optional) An optional comment on or description of the feedback.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_feedback(*, feedback_type: str = None, before: datetime.date = None, after: datetime.date = None, document_title: str = None, model_id: str = None, model_version: str = None, category_removed: str = None, category_added: str = None, category_not_changed: str = None, type_removed: str = None, type_added: str = None, type_not_changed: str = None, page_limit: int = None, cursor: str = None, sort: str = None, include_total: bool = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List the feedback in a document.

Lists the feedback in a document.

Parameters
  • feedback_type (str) – (optional) An optional string that filters the output to include only feedback with the specified feedback type. The only permitted value is element_classification.

  • before (date) – (optional) An optional string in the format YYYY-MM-DD that filters the output to include only feedback that was added before the specified date.

  • after (date) – (optional) An optional string in the format YYYY-MM-DD that filters the output to include only feedback that was added after the specified date.

  • document_title (str) – (optional) An optional string that filters the output to include only feedback from the document with the specified document_title.

  • model_id (str) – (optional) An optional string that filters the output to include only feedback with the specified model_id. The only permitted value is contracts.

  • model_version (str) – (optional) An optional string that filters the output to include only feedback with the specified model_version.

  • category_removed (str) – (optional) An optional string in the form of a comma-separated list of categories. If it is specified, the service filters the output to include only feedback that has at least one category from the list removed.

  • category_added (str) – (optional) An optional string in the form of a comma-separated list of categories. If this is specified, the service filters the output to include only feedback that has at least one category from the list added.

  • category_not_changed (str) – (optional) An optional string in the form of a comma-separated list of categories. If this is specified, the service filters the output to include only feedback that has at least one category from the list unchanged.

  • type_removed (str) – (optional) An optional string of comma-separated nature:party pairs. If this is specified, the service filters the output to include only feedback that has at least one nature:party pair from the list removed.

  • type_added (str) – (optional) An optional string of comma-separated nature:party pairs. If this is specified, the service filters the output to include only feedback that has at least one nature:party pair from the list removed.

  • type_not_changed (str) – (optional) An optional string of comma-separated nature:party pairs. If this is specified, the service filters the output to include only feedback that has at least one nature:party pair from the list unchanged.

  • page_limit (int) – (optional) An optional integer specifying the number of documents that you want the service to return.

  • cursor (str) – (optional) An optional string that returns the set of documents after the previous set. Use this parameter with the page_limit parameter.

  • sort (str) – (optional) An optional comma-separated list of fields in the document to sort on. You can optionally specify the sort direction by prefixing the value of the field with - for descending order or + for ascending order (the default). Currently permitted sorting fields are created, user_id, and document_title.

  • include_total (bool) – (optional) An optional boolean value. If specified as true, the pagination object in the output includes a value called total that gives the total count of feedback created.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_feedback(feedback_id: str, *, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get a specified feedback entry.

Gets a feedback entry with a specified feedback_id.

Parameters
  • feedback_id (str) – A string that specifies the feedback entry to be included in the output.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

delete_feedback(feedback_id: str, *, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Delete a specified feedback entry.

Deletes a feedback entry with a specified feedback_id.

Parameters
  • feedback_id (str) – A string that specifies the feedback entry to be deleted from the document.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

create_batch(function: str, input_credentials_file: BinaryIO, input_bucket_location: str, input_bucket_name: str, output_credentials_file: BinaryIO, output_bucket_location: str, output_bucket_name: str, *, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Submit a batch-processing request.

Run Compare and Comply methods over a collection of input documents. Important: Batch processing requires the use of the [IBM Cloud Object Storage service](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-about#about-ibm-cloud-object-storage). The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batching#before-you-batch).

Parameters
  • function (str) – The Compare and Comply method to run across the submitted input documents.

  • input_credentials_file (TextIO) – A JSON file containing the input Cloud Object Storage credentials. At a minimum, the credentials must enable READ permissions on the bucket defined by the input_bucket_name parameter.

  • input_bucket_location (str) – The geographical location of the Cloud Object Storage input bucket as listed on the Endpoint tab of your Cloud Object Storage instance; for example, us-geo, eu-geo, or ap-geo.

  • input_bucket_name (str) – The name of the Cloud Object Storage input bucket.

  • output_credentials_file (TextIO) – A JSON file that lists the Cloud Object Storage output credentials. At a minimum, the credentials must enable READ and WRITE permissions on the bucket defined by the output_bucket_name parameter.

  • output_bucket_location (str) – The geographical location of the Cloud Object Storage output bucket as listed on the Endpoint tab of your Cloud Object Storage instance; for example, us-geo, eu-geo, or ap-geo.

  • output_bucket_name (str) – The name of the Cloud Object Storage output bucket.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

list_batches(**kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

List submitted batch-processing jobs.

Lists batch-processing jobs submitted by users.

Parameters

headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

get_batch(batch_id: str, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Get information about a specific batch-processing job.

Gets information about a batch-processing job with a specified ID.

Parameters
  • batch_id (str) – The ID of the batch-processing job whose information you want to retrieve.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

update_batch(batch_id: str, action: str, *, model: str = None, **kwargs) → ibm_cloud_sdk_core.detailed_response.DetailedResponse[source]

Update a pending or active batch-processing job.

Updates a pending or active batch-processing job. You can rescan the input bucket to check for new documents or cancel a job.

Parameters
  • batch_id (str) – The ID of the batch-processing job you want to update.

  • action (str) – The action you want to perform on the specified batch-processing job.

  • model (str) – (optional) The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

  • headers (dict) – A dict containing the request headers

Returns

A DetailedResponse containing the result, headers and HTTP status code.

Return type

DetailedResponse

class ConvertToHtmlEnums[source]

Bases: object

class FileContentType(value)[source]

Bases: enum.Enum

The content type of file.

APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
TEXT_PLAIN = 'text/plain'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class ClassifyElementsEnums[source]

Bases: object

class FileContentType(value)[source]

Bases: enum.Enum

The content type of file.

APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class ExtractTablesEnums[source]

Bases: object

class FileContentType(value)[source]

Bases: enum.Enum

The content type of file.

APPLICATION_PDF = 'application/pdf'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
TEXT_PLAIN = 'text/plain'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class CompareDocumentsEnums[source]

Bases: object

class File1ContentType(value)[source]

Bases: enum.Enum

The content type of file_1.

APPLICATION_PDF = 'application/pdf'
APPLICATION_JSON = 'application/json'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class File2ContentType(value)[source]

Bases: enum.Enum

The content type of file_2.

APPLICATION_PDF = 'application/pdf'
APPLICATION_JSON = 'application/json'
APPLICATION_MSWORD = 'application/msword'
APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
IMAGE_BMP = 'image/bmp'
IMAGE_GIF = 'image/gif'
IMAGE_JPEG = 'image/jpeg'
IMAGE_PNG = 'image/png'
IMAGE_TIFF = 'image/tiff'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class GetFeedbackEnums[source]

Bases: object

class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class DeleteFeedbackEnums[source]

Bases: object

class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class CreateBatchEnums[source]

Bases: object

class Function(value)[source]

Bases: enum.Enum

The Compare and Comply method to run across the submitted input documents.

HTML_CONVERSION = 'html_conversion'
ELEMENT_CLASSIFICATION = 'element_classification'
TABLES = 'tables'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class UpdateBatchEnums[source]

Bases: object

class Action(value)[source]

Bases: enum.Enum

The action you want to perform on the specified batch-processing job.

RESCAN = 'rescan'
CANCEL = 'cancel'
class Model(value)[source]

Bases: enum.Enum

The analysis model to be used by the service. For the Element classification and Compare two documents methods, the default is contracts. For the Extract tables method, the default is tables. These defaults apply to the standalone methods as well as to the methods’ use in batch-processing requests.

CONTRACTS = 'contracts'
TABLES = 'tables'
class Address(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

A party’s address.

Attr str text

(optional) A string listing the address.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Address[source]

Initialize a Address object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class AlignedElement(*, element_pair: List[ElementPair] = None, identical_text: bool = None, provenance_ids: List[str] = None, significant_elements: bool = None)[source]

Bases: object

AlignedElement.

Attr List[ElementPair] element_pair

(optional) Identifies two elements that semantically align between the compared documents.

Attr bool identical_text

(optional) Specifies whether the aligned element is identical. Elements are considered identical despite minor differences such as leading punctuation, end-of-sentence punctuation, whitespace, the presence or absence of definite or indefinite articles, and others.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr bool significant_elements

(optional) Indicates that the elements aligned are contractual clauses of significance.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.AlignedElement[source]

Initialize a AlignedElement object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Attribute(*, type: str = None, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

List of document attributes.

Attr str type

(optional) The type of attribute.

Attr str text

(optional) The text associated with the attribute.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Attribute[source]

Initialize a Attribute object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeEnum(value)[source]

Bases: enum.Enum

The type of attribute.

CURRENCY = 'Currency'
DATETIME = 'DateTime'
DEFINEDTERM = 'DefinedTerm'
DURATION = 'Duration'
LOCATION = 'Location'
NUMBER = 'Number'
ORGANIZATION = 'Organization'
PERCENTAGE = 'Percentage'
PERSON = 'Person'
class BatchStatus(*, function: str = None, input_bucket_location: str = None, input_bucket_name: str = None, output_bucket_location: str = None, output_bucket_name: str = None, batch_id: str = None, document_counts: Optional[ibm_watson.compare_comply_v1.DocCounts] = None, status: str = None, created: datetime.datetime = None, updated: datetime.datetime = None)[source]

Bases: object

The batch-request status.

Attr str function

(optional) The method to be run against the documents. Possible values are html_conversion, element_classification, and tables.

Attr str input_bucket_location

(optional) The geographical location of the Cloud Object Storage input bucket as listed on the Endpoint tab of your COS instance; for example, us-geo, eu-geo, or ap-geo.

Attr str input_bucket_name

(optional) The name of the Cloud Object Storage input bucket.

Attr str output_bucket_location

(optional) The geographical location of the Cloud Object Storage output bucket as listed on the Endpoint tab of your COS instance; for example, us-geo, eu-geo, or ap-geo.

Attr str output_bucket_name

(optional) The name of the Cloud Object Storage output bucket.

Attr str batch_id

(optional) The unique identifier for the batch request.

Attr DocCounts document_counts

(optional) Document counts.

Attr str status

(optional) The status of the batch request.

Attr datetime created

(optional) The creation time of the batch request.

Attr datetime updated

(optional) The time of the most recent update to the batch request.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.BatchStatus[source]

Initialize a BatchStatus object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FunctionEnum(value)[source]

Bases: enum.Enum

The method to be run against the documents. Possible values are html_conversion, element_classification, and tables.

ELEMENT_CLASSIFICATION = 'element_classification'
HTML_CONVERSION = 'html_conversion'
TABLES = 'tables'
class Batches(*, batches: List[BatchStatus] = None)[source]

Bases: object

The results of a successful List Batches request.

Attr List[BatchStatus] batches

(optional) A list of the status of all batch requests.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Batches[source]

Initialize a Batches object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class BodyCells(*, cell_id: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, row_index_begin: int = None, row_index_end: int = None, column_index_begin: int = None, column_index_end: int = None, row_header_ids: List[str] = None, row_header_texts: List[str] = None, row_header_texts_normalized: List[str] = None, column_header_ids: List[str] = None, column_header_texts: List[str] = None, column_header_texts_normalized: List[str] = None, attributes: List[Attribute] = None)[source]

Bases: object

Cells that are not table header, column header, or row header cells.

Attr str cell_id

(optional) The unique ID of the cell in the current table.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The textual contents of this cell from the input document without associated markup content.

Attr int row_index_begin

(optional) The begin index of this cell’s row location in the current table.

Attr int row_index_end

(optional) The end index of this cell’s row location in the current table.

Attr int column_index_begin

(optional) The begin index of this cell’s column location in the current table.

Attr int column_index_end

(optional) The end index of this cell’s column location in the current table.

Attr List[str] row_header_ids

(optional) An array that contains the id value of a row header that is applicable to this body cell.

Attr List[str] row_header_texts

(optional) An array that contains the text value of a row header that is applicable to this body cell.

Attr List[str] row_header_texts_normalized

(optional) If you provide customization input, the normalized version of the row header texts according to the customization; otherwise, the same value as row_header_texts.

Attr List[str] column_header_ids

(optional) An array that contains the id value of a column header that is applicable to the current cell.

Attr List[str] column_header_texts

(optional) An array that contains the text value of a column header that is applicable to the current cell.

Attr List[str] column_header_texts_normalized

(optional) If you provide customization input, the normalized version of the column header texts according to the customization; otherwise, the same value as column_header_texts.

Attr List[Attribute] attributes

(optional)

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.BodyCells[source]

Initialize a BodyCells object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Category(*, label: str = None, provenance_ids: List[str] = None)[source]

Bases: object

Information defining an element’s subject matter.

Attr str label

(optional) The category of the associated element.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Category[source]

Initialize a Category object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LabelEnum(value)[source]

Bases: enum.Enum

The category of the associated element.

AMENDMENTS = 'Amendments'
ASSET_USE = 'Asset Use'
ASSIGNMENTS = 'Assignments'
AUDITS = 'Audits'
BUSINESS_CONTINUITY = 'Business Continuity'
COMMUNICATION = 'Communication'
CONFIDENTIALITY = 'Confidentiality'
DELIVERABLES = 'Deliverables'
DELIVERY = 'Delivery'
DISPUTE_RESOLUTION = 'Dispute Resolution'
FORCE_MAJEURE = 'Force Majeure'
INDEMNIFICATION = 'Indemnification'
INSURANCE = 'Insurance'
INTELLECTUAL_PROPERTY = 'Intellectual Property'
LIABILITY = 'Liability'
ORDER_OF_PRECEDENCE = 'Order of Precedence'
PAYMENT_TERMS_BILLING = 'Payment Terms & Billing'
PRICING_TAXES = 'Pricing & Taxes'
PRIVACY = 'Privacy'
RESPONSIBILITIES = 'Responsibilities'
SAFETY_AND_SECURITY = 'Safety and Security'
SCOPE_OF_WORK = 'Scope of Work'
SUBCONTRACTS = 'Subcontracts'
TERM_TERMINATION = 'Term & Termination'
WARRANTIES = 'Warranties'
class CategoryComparison(*, label: str = None)[source]

Bases: object

Information defining an element’s subject matter.

Attr str label

(optional) The category of the associated element.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.CategoryComparison[source]

Initialize a CategoryComparison object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LabelEnum(value)[source]

Bases: enum.Enum

The category of the associated element.

AMENDMENTS = 'Amendments'
ASSET_USE = 'Asset Use'
ASSIGNMENTS = 'Assignments'
AUDITS = 'Audits'
BUSINESS_CONTINUITY = 'Business Continuity'
COMMUNICATION = 'Communication'
CONFIDENTIALITY = 'Confidentiality'
DELIVERABLES = 'Deliverables'
DELIVERY = 'Delivery'
DISPUTE_RESOLUTION = 'Dispute Resolution'
FORCE_MAJEURE = 'Force Majeure'
INDEMNIFICATION = 'Indemnification'
INSURANCE = 'Insurance'
INTELLECTUAL_PROPERTY = 'Intellectual Property'
LIABILITY = 'Liability'
ORDER_OF_PRECEDENCE = 'Order of Precedence'
PAYMENT_TERMS_BILLING = 'Payment Terms & Billing'
PRICING_TAXES = 'Pricing & Taxes'
PRIVACY = 'Privacy'
RESPONSIBILITIES = 'Responsibilities'
SAFETY_AND_SECURITY = 'Safety and Security'
SCOPE_OF_WORK = 'Scope of Work'
SUBCONTRACTS = 'Subcontracts'
TERM_TERMINATION = 'Term & Termination'
WARRANTIES = 'Warranties'
class ClassifyReturn(*, document: Optional[ibm_watson.compare_comply_v1.Document] = None, model_id: str = None, model_version: str = None, elements: List[Element] = None, effective_dates: List[EffectiveDates] = None, contract_amounts: List[ContractAmts] = None, termination_dates: List[TerminationDates] = None, contract_types: List[ContractTypes] = None, contract_terms: List[ContractTerms] = None, payment_terms: List[PaymentTerms] = None, contract_currencies: List[ContractCurrencies] = None, tables: List[Tables] = None, document_structure: Optional[ibm_watson.compare_comply_v1.DocStructure] = None, parties: List[Parties] = None)[source]

Bases: object

The analysis of objects returned by the Element classification method.

Attr Document document

(optional) Basic information about the input document.

Attr str model_id

(optional) The analysis model used to classify the input document. For the Element classification method, the only valid value is contracts.

Attr str model_version

(optional) The version of the analysis model identified by the value of the model_id key.

Attr List[Element] elements

(optional) Document elements identified by the service.

Attr List[EffectiveDates] effective_dates

(optional) The date or dates on which the document becomes effective.

Attr List[ContractAmts] contract_amounts

(optional) The monetary amounts that identify the total amount of the contract that needs to be paid from one party to another.

Attr List[TerminationDates] termination_dates

(optional) The dates on which the document is to be terminated.

Attr List[ContractTypes] contract_types

(optional) The contract type as declared in the document.

Attr List[ContractTerms] contract_terms

(optional) The durations of the contract.

Attr List[PaymentTerms] payment_terms

(optional) The document’s payment durations.

Attr List[ContractCurrencies] contract_currencies

(optional) The contract currencies as declared in the document.

Attr List[Tables] tables

(optional) Definition of tables identified in the input document.

Attr DocStructure document_structure

(optional) The structure of the input document.

Attr List[Parties] parties

(optional) Definitions of the parties identified in the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ClassifyReturn[source]

Initialize a ClassifyReturn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ColumnHeaders(*, cell_id: str = None, location: object = None, text: str = None, text_normalized: str = None, row_index_begin: int = None, row_index_end: int = None, column_index_begin: int = None, column_index_end: int = None)[source]

Bases: object

Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.

Attr str cell_id

(optional) The unique ID of the cell in the current table.

Attr object location

(optional) The location of the column header cell in the current table as defined by its begin and end offsets, respectfully, in the input document.

Attr str text

(optional) The textual contents of this cell from the input document without associated markup content.

Attr str text_normalized

(optional) If you provide customization input, the normalized version of the cell text according to the customization; otherwise, the same value as text.

Attr int row_index_begin

(optional) The begin index of this cell’s row location in the current table.

Attr int row_index_end

(optional) The end index of this cell’s row location in the current table.

Attr int column_index_begin

(optional) The begin index of this cell’s column location in the current table.

Attr int column_index_end

(optional) The end index of this cell’s column location in the current table.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ColumnHeaders[source]

Initialize a ColumnHeaders object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class CompareReturn(*, model_id: str = None, model_version: str = None, documents: List[Document] = None, aligned_elements: List[AlignedElement] = None, unaligned_elements: List[UnalignedElement] = None)[source]

Bases: object

The comparison of the two submitted documents.

Attr str model_id

(optional) The analysis model used to compare the input documents. For the Compare two documents method, the only valid value is contracts.

Attr str model_version

(optional) The version of the analysis model identified by the value of the model_id key.

Attr List[Document] documents

(optional) Information about the documents being compared.

Attr List[AlignedElement] aligned_elements

(optional) A list of pairs of elements that semantically align between the compared documents.

Attr List[UnalignedElement] unaligned_elements

(optional) A list of elements that do not semantically align between the compared documents.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.CompareReturn[source]

Initialize a CompareReturn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Contact(*, name: str = None, role: str = None)[source]

Bases: object

A contact.

Attr str name

(optional) A string listing the name of the contact.

Attr str role

(optional) A string listing the role of the contact.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Contact[source]

Initialize a Contact object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Contexts(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

Text that is related to the contents of the table and that precedes or follows the current table.

Attr str text

(optional) The related text.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Contexts[source]

Initialize a Contexts object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ContractAmts(*, confidence_level: str = None, text: str = None, text_normalized: str = None, interpretation: Optional[ibm_watson.compare_comply_v1.Interpretation] = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

A monetary amount identified in the input document.

Attr str confidence_level

(optional) The confidence level in the identification of the contract amount.

Attr str text

(optional) The monetary amount.

Attr str text_normalized

(optional) The normalized form of the amount, which is listed as a string. This element is optional; it is returned only if normalized text exists.

Attr Interpretation interpretation

(optional) The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ContractAmts[source]

Initialize a ContractAmts object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the contract amount.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractCurrencies(*, confidence_level: str = None, text: str = None, text_normalized: str = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The contract currencies that are declared in the document.

Attr str confidence_level

(optional) The confidence level in the identification of the contract currency.

Attr str text

(optional) The contract currency.

Attr str text_normalized

(optional) The normalized form of the contract currency, which is listed as a string in [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) format. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ContractCurrencies[source]

Initialize a ContractCurrencies object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the contract currency.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractTerms(*, confidence_level: str = None, text: str = None, text_normalized: str = None, interpretation: Optional[ibm_watson.compare_comply_v1.Interpretation] = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The duration or durations of the contract.

Attr str confidence_level

(optional) The confidence level in the identification of the contract term.

Attr str text

(optional) The contract term (duration).

Attr str text_normalized

(optional) The normalized form of the contract term, which is listed as a string. This element is optional; it is returned only if normalized text exists.

Attr Interpretation interpretation

(optional) The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ContractTerms[source]

Initialize a ContractTerms object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the contract term.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractTypes(*, confidence_level: str = None, text: str = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The contract type identified in the input document.

Attr str confidence_level

(optional) The confidence level in the identification of the contract type.

Attr str text

(optional) The contract type.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ContractTypes[source]

Initialize a ContractTypes object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the contract type.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class DocCounts(*, total: int = None, pending: int = None, successful: int = None, failed: int = None)[source]

Bases: object

Document counts.

Attr int total

(optional) Total number of documents.

Attr int pending

(optional) Number of pending documents.

Attr int successful

(optional) Number of documents successfully processed.

Attr int failed

(optional) Number of documents not successfully processed.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.DocCounts[source]

Initialize a DocCounts object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DocInfo(*, html: str = None, title: str = None, hash: str = None)[source]

Bases: object

Information about the parsed input document.

Attr str html

(optional) The full text of the parsed document in HTML format.

Attr str title

(optional) The title of the parsed document. If the service did not detect a title, the value of this element is null.

Attr str hash

(optional) The MD5 hash of the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.DocInfo[source]

Initialize a DocInfo object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class DocStructure(*, section_titles: List[SectionTitles] = None, leading_sentences: List[LeadingSentence] = None, paragraphs: List[Paragraphs] = None)[source]

Bases: object

The structure of the input document.

Attr List[SectionTitles] section_titles

(optional) An array containing one object per section or subsection identified in the input document.

Attr List[LeadingSentence] leading_sentences

(optional) An array containing one object per section or subsection, in parallel with the section_titles array, that details the leading sentences in the corresponding section or subsection.

Attr List[Paragraphs] paragraphs

(optional) An array containing one object per paragraph, in parallel with the section_titles and leading_sentences arrays.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.DocStructure[source]

Initialize a DocStructure object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Document(*, title: str = None, html: str = None, hash: str = None, label: str = None)[source]

Bases: object

Basic information about the input document.

Attr str title

(optional) Document title, if detected.

Attr str html

(optional) The input document converted into HTML format.

Attr str hash

(optional) The MD5 hash value of the input document.

Attr str label

(optional) The label applied to the input document with the calling method’s file_1_label or file_2_label value. This field is specified only in the output of the Comparing two documents method.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Document[source]

Initialize a Document object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class EffectiveDates(*, confidence_level: str = None, text: str = None, text_normalized: str = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

An effective date.

Attr str confidence_level

(optional) The confidence level in the identification of the effective date.

Attr str text

(optional) The effective date, listed as a string.

Attr str text_normalized

(optional) The normalized form of the effective date, which is listed as a string. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.EffectiveDates[source]

Initialize a EffectiveDates object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the effective date.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class Element(*, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, types: List[TypeLabel] = None, categories: List[Category] = None, attributes: List[Attribute] = None)[source]

Bases: object

A component part of the document.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text of the element.

Attr List[TypeLabel] types

(optional) Description of the action specified by the element and whom it affects.

Attr List[Category] categories

(optional) List of functional categories into which the element falls; in other words, the subject matter of the element.

Attr List[Attribute] attributes

(optional) List of document attributes.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Element[source]

Initialize a Element object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ElementLocations(*, begin: int = None, end: int = None)[source]

Bases: object

A list of begin and end indexes that indicate the locations of the elements in the input document.

Attr int begin

(optional) An integer that indicates the starting position of the element in the input document.

Attr int end

(optional) An integer that indicates the ending position of the element in the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ElementLocations[source]

Initialize a ElementLocations object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ElementPair(*, document_label: str = None, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, types: List[TypeLabelComparison] = None, categories: List[CategoryComparison] = None, attributes: List[Attribute] = None)[source]

Bases: object

Details of semantically aligned elements.

Attr str document_label

(optional) The label of the document (that is, the value of either the file_1_label or file_2_label parameters) in which the element occurs.

Attr str text

(optional) The contents of the element.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr List[TypeLabelComparison] types

(optional) Description of the action specified by the element and whom it affects.

Attr List[CategoryComparison] categories

(optional) List of functional categories into which the element falls; in other words, the subject matter of the element.

Attr List[Attribute] attributes

(optional) List of document attributes.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ElementPair[source]

Initialize a ElementPair object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FeedbackDataInput(feedback_type: str, location: ibm_watson.compare_comply_v1.Location, text: str, original_labels: ibm_watson.compare_comply_v1.OriginalLabelsIn, updated_labels: ibm_watson.compare_comply_v1.UpdatedLabelsIn, *, document: Optional[ibm_watson.compare_comply_v1.ShortDoc] = None, model_id: str = None, model_version: str = None)[source]

Bases: object

Feedback data for submission.

Attr str feedback_type

The type of feedback. The only permitted value is element_classification.

Attr ShortDoc document

(optional) Brief information about the input document.

Attr str model_id

(optional) An optional string identifying the model ID. The only permitted value is contracts.

Attr str model_version

(optional) An optional string identifying the version of the model used.

Attr Location location

The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

The text on which to submit feedback.

Attr OriginalLabelsIn original_labels

The original labeling from the input document, without the submitted feedback.

Attr UpdatedLabelsIn updated_labels

The updated labeling from the input document, accounting for the submitted feedback.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.FeedbackDataInput[source]

Initialize a FeedbackDataInput object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FeedbackDataOutput(*, feedback_type: str = None, document: Optional[ibm_watson.compare_comply_v1.ShortDoc] = None, model_id: str = None, model_version: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, original_labels: Optional[ibm_watson.compare_comply_v1.OriginalLabelsOut] = None, updated_labels: Optional[ibm_watson.compare_comply_v1.UpdatedLabelsOut] = None, pagination: Optional[ibm_watson.compare_comply_v1.Pagination] = None)[source]

Bases: object

Information returned from the Add Feedback method.

Attr str feedback_type

(optional) A string identifying the user adding the feedback. The only permitted value is element_classification.

Attr ShortDoc document

(optional) Brief information about the input document.

Attr str model_id

(optional) An optional string identifying the model ID. The only permitted value is contracts.

Attr str model_version

(optional) An optional string identifying the version of the model used.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text to which the feedback applies.

Attr OriginalLabelsOut original_labels

(optional) The original labeling from the input document, without the submitted feedback.

Attr UpdatedLabelsOut updated_labels

(optional) The updated labeling from the input document, accounting for the submitted feedback.

Attr Pagination pagination

(optional) Pagination details, if required by the length of the output.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.FeedbackDataOutput[source]

Initialize a FeedbackDataOutput object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FeedbackDeleted(*, status: int = None, message: str = None)[source]

Bases: object

The status and message of the deletion request.

Attr int status

(optional) HTTP return code.

Attr str message

(optional) Status message returned from the service.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.FeedbackDeleted[source]

Initialize a FeedbackDeleted object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FeedbackList(*, feedback: List[GetFeedback] = None)[source]

Bases: object

The results of a successful List Feedback request for all feedback.

Attr List[GetFeedback] feedback

(optional) A list of all feedback for the document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.FeedbackList[source]

Initialize a FeedbackList object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class FeedbackReturn(*, feedback_id: str = None, user_id: str = None, comment: str = None, created: datetime.datetime = None, feedback_data: Optional[ibm_watson.compare_comply_v1.FeedbackDataOutput] = None)[source]

Bases: object

Information about the document and the submitted feedback.

Attr str feedback_id

(optional) The unique ID of the feedback object.

Attr str user_id

(optional) An optional string identifying the person submitting feedback.

Attr str comment

(optional) An optional comment from the person submitting the feedback.

Attr datetime created

(optional) Timestamp listing the creation time of the feedback submission.

Attr FeedbackDataOutput feedback_data

(optional) Information returned from the Add Feedback method.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.FeedbackReturn[source]

Initialize a FeedbackReturn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class GetFeedback(*, feedback_id: str = None, created: datetime.datetime = None, comment: str = None, feedback_data: Optional[ibm_watson.compare_comply_v1.FeedbackDataOutput] = None)[source]

Bases: object

The results of a successful Get Feedback request for a single feedback entry.

Attr str feedback_id

(optional) A string uniquely identifying the feedback entry.

Attr datetime created

(optional) A timestamp identifying the creation time of the feedback entry.

Attr str comment

(optional) A string containing the user’s comment about the feedback entry.

Attr FeedbackDataOutput feedback_data

(optional) Information returned from the Add Feedback method.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.GetFeedback[source]

Initialize a GetFeedback object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class HTMLReturn(*, num_pages: str = None, author: str = None, publication_date: str = None, title: str = None, html: str = None)[source]

Bases: object

The HTML converted from an input document.

Attr str num_pages

(optional) The number of pages in the input document.

Attr str author

(optional) The author of the input document, if identified.

Attr str publication_date

(optional) The publication date of the input document, if identified.

Attr str title

(optional) The title of the input document, if identified.

Attr str html

(optional) The HTML version of the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.HTMLReturn[source]

Initialize a HTMLReturn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Interpretation(*, value: str = None, numeric_value: float = None, unit: str = None)[source]

Bases: object

The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.

Attr str value

(optional) The value that was located in the normalized text.

Attr float numeric_value

(optional) An integer or float expressing the numeric value of the value key.

Attr str unit

(optional) A string listing the unit of the value that was found in the normalized text. Note: The value of unit is the [ISO-4217 currency code](https://www.iso.org/iso-4217-currency-codes.html) identified for the currency amount (for example, USD or EUR). If the service cannot disambiguate a currency symbol (for example, $ or £), the value of unit contains the ambiguous symbol as-is.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Interpretation[source]

Initialize a Interpretation object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Key(*, cell_id: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None)[source]

Bases: object

A key in a key-value pair.

Attr str cell_id

(optional) The unique ID of the key in the table.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text content of the table cell without HTML markup.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Key[source]

Initialize a Key object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class KeyValuePair(*, key: Optional[ibm_watson.compare_comply_v1.Key] = None, value: List[Value] = None)[source]

Bases: object

Key-value pairs detected across cell boundaries.

Attr Key key

(optional) A key in a key-value pair.

Attr List[Value] value

(optional) A list of values in a key-value pair.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.KeyValuePair[source]

Initialize a KeyValuePair object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Label(nature: str, party: str)[source]

Bases: object

A pair of nature and party objects. The nature object identifies the effect of the element on the identified party, and the party object identifies the affected party.

Attr str nature

The identified nature of the element.

Attr str party

The identified party of the element.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Label[source]

Initialize a Label object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class LeadingSentence(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, element_locations: List[ElementLocations] = None)[source]

Bases: object

The leading sentences in a section or subsection of the input document.

Attr str text

(optional) The text of the leading sentence.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr List[ElementLocations] element_locations

(optional) An array of location objects that lists the locations of detected leading sentences.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.LeadingSentence[source]

Initialize a LeadingSentence object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Location(begin: int, end: int)[source]

Bases: object

The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr int begin

The element’s begin index.

Attr int end

The element’s end index.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Location[source]

Initialize a Location object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Mention(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

A mention of a party.

Attr str text

(optional) The name of the party.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Mention[source]

Initialize a Mention object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class OriginalLabelsIn(types: List[TypeLabel], categories: List[Category])[source]

Bases: object

The original labeling from the input document, without the submitted feedback.

Attr List[TypeLabel] types

Description of the action specified by the element and whom it affects.

Attr List[Category] categories

List of functional categories into which the element falls; in other words, the subject matter of the element.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.OriginalLabelsIn[source]

Initialize a OriginalLabelsIn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class OriginalLabelsOut(*, types: List[TypeLabel] = None, categories: List[Category] = None, modification: str = None)[source]

Bases: object

The original labeling from the input document, without the submitted feedback.

Attr List[TypeLabel] types

(optional) Description of the action specified by the element and whom it affects.

Attr List[Category] categories

(optional) List of functional categories into which the element falls; in other words, the subject matter of the element.

Attr str modification

(optional) A string identifying the type of modification the feedback entry in the updated_labels array. Possible values are added, not_changed, and removed.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.OriginalLabelsOut[source]

Initialize a OriginalLabelsOut object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ModificationEnum(value)[source]

Bases: enum.Enum

A string identifying the type of modification the feedback entry in the updated_labels array. Possible values are added, not_changed, and removed.

ADDED = 'added'
NOT_CHANGED = 'not_changed'
REMOVED = 'removed'
class Pagination(*, refresh_cursor: str = None, next_cursor: str = None, refresh_url: str = None, next_url: str = None, total: int = None)[source]

Bases: object

Pagination details, if required by the length of the output.

Attr str refresh_cursor

(optional) A token identifying the current page of results.

Attr str next_cursor

(optional) A token identifying the next page of results.

Attr str refresh_url

(optional) The URL that returns the current page of results.

Attr str next_url

(optional) The URL that returns the next page of results.

Attr int total

(optional) Reserved for future use.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Pagination[source]

Initialize a Pagination object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Paragraphs(*, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The locations of each paragraph in the input document.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Paragraphs[source]

Initialize a Paragraphs object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Parties(*, party: str = None, role: str = None, importance: str = None, addresses: List[Address] = None, contacts: List[Contact] = None, mentions: List[Mention] = None)[source]

Bases: object

A party and its corresponding role, including address and contact information if identified.

Attr str party

(optional) The normalized form of the party’s name.

Attr str role

(optional) A string identifying the party’s role.

Attr str importance

(optional) A string that identifies the importance of the party.

Attr List[Address] addresses

(optional) A list of the party’s address or addresses.

Attr List[Contact] contacts

(optional) A list of the names and roles of contacts identified in the input document.

Attr List[Mention] mentions

(optional) A list of the party’s mentions in the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Parties[source]

Initialize a Parties object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ImportanceEnum(value)[source]

Bases: enum.Enum

A string that identifies the importance of the party.

PRIMARY = 'Primary'
UNKNOWN = 'Unknown'
class PaymentTerms(*, confidence_level: str = None, text: str = None, text_normalized: str = None, interpretation: Optional[ibm_watson.compare_comply_v1.Interpretation] = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The document’s payment duration or durations.

Attr str confidence_level

(optional) The confidence level in the identification of the payment term.

Attr str text

(optional) The payment term (duration).

Attr str text_normalized

(optional) The normalized form of the payment term, which is listed as a string. This element is optional; it is returned only if normalized text exists.

Attr Interpretation interpretation

(optional) The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.PaymentTerms[source]

Initialize a PaymentTerms object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the payment term.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class RowHeaders(*, cell_id: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, text_normalized: str = None, row_index_begin: int = None, row_index_end: int = None, column_index_begin: int = None, column_index_end: int = None)[source]

Bases: object

Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table.

Attr str cell_id

(optional) The unique ID of the cell in the current table.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The textual contents of this cell from the input document without associated markup content.

Attr str text_normalized

(optional) If you provide customization input, the normalized version of the cell text according to the customization; otherwise, the same value as text.

Attr int row_index_begin

(optional) The begin index of this cell’s row location in the current table.

Attr int row_index_end

(optional) The end index of this cell’s row location in the current table.

Attr int column_index_begin

(optional) The begin index of this cell’s column location in the current table.

Attr int column_index_end

(optional) The end index of this cell’s column location in the current table.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.RowHeaders[source]

Initialize a RowHeaders object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class SectionTitle(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

The table’s section title, if identified.

Attr str text

(optional) The text of the section title, if identified.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.SectionTitle[source]

Initialize a SectionTitle object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class SectionTitles(*, text: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, level: int = None, element_locations: List[ElementLocations] = None)[source]

Bases: object

An array containing one object per section or subsection detected in the input document. Sections and subsections are not nested; instead, they are flattened out and can be placed back in order by using the begin and end values of the element and the level value of the section.

Attr str text

(optional) The text of the section title, if identified.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr int level

(optional) An integer indicating the level at which the section is located in the input document. For example, 1 represents a top-level section, 2 represents a subsection within the level 1 section, and so forth.

Attr List[ElementLocations] element_locations

(optional) An array of location objects that lists the locations of detected section titles.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.SectionTitles[source]

Initialize a SectionTitles object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ShortDoc(*, title: str = None, hash: str = None)[source]

Bases: object

Brief information about the input document.

Attr str title

(optional) The title of the input document, if identified.

Attr str hash

(optional) The MD5 hash of the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.ShortDoc[source]

Initialize a ShortDoc object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TableHeaders(*, cell_id: str = None, location: object = None, text: str = None, row_index_begin: int = None, row_index_end: int = None, column_index_begin: int = None, column_index_end: int = None)[source]

Bases: object

The contents of the current table’s header.

Attr str cell_id

(optional) The unique ID of the cell in the current table.

Attr object location

(optional) The location of the table header cell in the current table as defined by its begin and end offsets, respectfully, in the input document.

Attr str text

(optional) The textual contents of the cell from the input document without associated markup content.

Attr int row_index_begin

(optional) The begin index of this cell’s row location in the current table.

Attr int row_index_end

(optional) The end index of this cell’s row location in the current table.

Attr int column_index_begin

(optional) The begin index of this cell’s column location in the current table.

Attr int column_index_end

(optional) The end index of this cell’s column location in the current table.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TableHeaders[source]

Initialize a TableHeaders object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TableReturn(*, document: Optional[ibm_watson.compare_comply_v1.DocInfo] = None, model_id: str = None, model_version: str = None, tables: List[Tables] = None)[source]

Bases: object

The analysis of the document’s tables.

Attr DocInfo document

(optional) Information about the parsed input document.

Attr str model_id

(optional) The ID of the model used to extract the table contents. The value for table extraction is tables.

Attr str model_version

(optional) The version of the tables model ID.

Attr List[Tables] tables

(optional) Definitions of the tables identified in the input document.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TableReturn[source]

Initialize a TableReturn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TableTitle(*, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None)[source]

Bases: object

If identified, the title or caption of the current table of the form Table x.: …. Empty when no title is identified. When exposed, the title is also excluded from the contexts array of the same table.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text of the identified table title or caption.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TableTitle[source]

Initialize a TableTitle object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class Tables(*, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, section_title: Optional[ibm_watson.compare_comply_v1.SectionTitle] = None, title: Optional[ibm_watson.compare_comply_v1.TableTitle] = None, table_headers: List[TableHeaders] = None, row_headers: List[RowHeaders] = None, column_headers: List[ColumnHeaders] = None, body_cells: List[BodyCells] = None, contexts: List[Contexts] = None, key_value_pairs: List[KeyValuePair] = None)[source]

Bases: object

The contents of the tables extracted from a document.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The textual contents of the current table from the input document without associated markup content.

Attr SectionTitle section_title

(optional) The table’s section title, if identified.

Attr TableTitle title

(optional) If identified, the title or caption of the current table of the form Table x.: …. Empty when no title is identified. When exposed, the title is also excluded from the contexts array of the same table.

Attr List[TableHeaders] table_headers

(optional) An array of table-level cells that apply as headers to all the other cells in the current table.

Attr List[RowHeaders] row_headers

(optional) An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the current table.

Attr List[ColumnHeaders] column_headers

(optional) An array of column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.

Attr List[BodyCells] body_cells

(optional) An array of cells that are neither table header nor column header nor row header cells, of the current table with corresponding row and column header associations.

Attr List[Contexts] contexts

(optional) An array of objects that list text that is related to the table contents and that precedes or follows the current table.

Attr List[KeyValuePair] key_value_pairs

(optional) An array of key-value pairs identified in the current table.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Tables[source]

Initialize a Tables object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TerminationDates(*, confidence_level: str = None, text: str = None, text_normalized: str = None, provenance_ids: List[str] = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None)[source]

Bases: object

Termination dates identified in the input document.

Attr str confidence_level

(optional) The confidence level in the identification of the termination date.

Attr str text

(optional) The termination date.

Attr str text_normalized

(optional) The normalized form of the termination date, which is listed as a string. This element is optional; it is returned only if normalized text exists.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TerminationDates[source]

Initialize a TerminationDates object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ConfidenceLevelEnum(value)[source]

Bases: enum.Enum

The confidence level in the identification of the termination date.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class TypeLabel(*, label: Optional[ibm_watson.compare_comply_v1.Label] = None, provenance_ids: List[str] = None)[source]

Bases: object

Identification of a specific type.

Attr Label label

(optional) A pair of nature and party objects. The nature object identifies the effect of the element on the identified party, and the party object identifies the affected party.

Attr List[str] provenance_ids

(optional) Hashed values that you can send to IBM to provide feedback or receive support.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TypeLabel[source]

Initialize a TypeLabel object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class TypeLabelComparison(*, label: Optional[ibm_watson.compare_comply_v1.Label] = None)[source]

Bases: object

Identification of a specific type.

Attr Label label

(optional) A pair of nature and party objects. The nature object identifies the effect of the element on the identified party, and the party object identifies the affected party.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.TypeLabelComparison[source]

Initialize a TypeLabelComparison object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class UnalignedElement(*, document_label: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None, types: List[TypeLabelComparison] = None, categories: List[CategoryComparison] = None, attributes: List[Attribute] = None)[source]

Bases: object

Element that does not align semantically between two compared documents.

Attr str document_label

(optional) The label assigned to the document by the value of the file_1_label or file_2_label parameters on the Compare two documents method.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text of the element.

Attr List[TypeLabelComparison] types

(optional) Description of the action specified by the element and whom it affects.

Attr List[CategoryComparison] categories

(optional) List of functional categories into which the element falls; in other words, the subject matter of the element.

Attr List[Attribute] attributes

(optional) List of document attributes.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.UnalignedElement[source]

Initialize a UnalignedElement object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class UpdatedLabelsIn(types: List[TypeLabel], categories: List[Category])[source]

Bases: object

The updated labeling from the input document, accounting for the submitted feedback.

Attr List[TypeLabel] types

Description of the action specified by the element and whom it affects.

Attr List[Category] categories

List of functional categories into which the element falls; in other words, the subject matter of the element.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.UpdatedLabelsIn[source]

Initialize a UpdatedLabelsIn object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class UpdatedLabelsOut(*, types: List[TypeLabel] = None, categories: List[Category] = None, modification: str = None)[source]

Bases: object

The updated labeling from the input document, accounting for the submitted feedback.

Attr List[TypeLabel] types

(optional) Description of the action specified by the element and whom it affects.

Attr List[Category] categories

(optional) List of functional categories into which the element falls; in other words, the subject matter of the element.

Attr str modification

(optional) The type of modification the feedback entry in the updated_labels array. Possible values are added, not_changed, and removed.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.UpdatedLabelsOut[source]

Initialize a UpdatedLabelsOut object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.

class ModificationEnum(value)[source]

Bases: enum.Enum

The type of modification the feedback entry in the updated_labels array. Possible values are added, not_changed, and removed.

ADDED = 'added'
NOT_CHANGED = 'not_changed'
REMOVED = 'removed'
class Value(*, cell_id: str = None, location: Optional[ibm_watson.compare_comply_v1.Location] = None, text: str = None)[source]

Bases: object

A value in a key-value pair.

Attr str cell_id

(optional) The unique ID of the value in the table.

Attr Location location

(optional) The numeric location of the identified element in the document, represented with two integers labeled begin and end.

Attr str text

(optional) The text content of the table cell without HTML markup.

classmethod from_dict(_dict: Dict)ibm_watson.compare_comply_v1.Value[source]

Initialize a Value object from a json dictionary.

to_dict() → Dict[source]

Return a json dictionary representing this model.