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, authenticator=None)[source]

Bases: ibm_cloud_sdk_core.base_service.BaseService

The Compare Comply V1 service.

default_service_url = 'https://gateway.watsonplatform.net/compare-comply/api'
convert_to_html(file, *, file_content_type=None, model=None, **kwargs)[source]

Convert document to HTML.

Converts a document to HTML.

Parameters
  • file (file) – 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, *, file_content_type=None, model=None, **kwargs)[source]

Classify the elements of a document.

Analyzes the structural and semantic elements of a document.

Parameters
  • file (file) – 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, *, file_content_type=None, model=None, **kwargs)[source]

Extract a document’s tables.

Analyzes the tables in a document.

Parameters
  • file (file) – 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, file_2, *, file_1_content_type=None, file_2_content_type=None, file_1_label=None, file_2_label=None, model=None, **kwargs)[source]

Compare two documents.

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

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

  • file_2 (file) – 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, *, user_id=None, comment=None, **kwargs)[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=None, before=None, after=None, document_title=None, model_id=None, model_version=None, category_removed=None, category_added=None, category_not_changed=None, type_removed=None, type_added=None, type_not_changed=None, page_limit=None, cursor=None, sort=None, include_total=None, **kwargs)[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, *, model=None, **kwargs)[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, *, model=None, **kwargs)[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, input_credentials_file, input_bucket_location, input_bucket_name, output_credentials_file, output_bucket_location, output_bucket_name, *, model=None, **kwargs)[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/services/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/services/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 (file) – 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 (file) – 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)[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, **kwargs)[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, action, *, model=None, **kwargs)[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[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[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[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[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[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[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[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[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[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[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[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[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[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[source]

Bases: enum.Enum

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

RESCAN = 'rescan'
CANCEL = 'cancel'
class Model[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=None, 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.

class AlignedElement(*, element_pair=None, identical_text=None, provenance_ids=None, significant_elements=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.

class Attribute(*, type=None, text=None, 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.

class TypeEnum[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=None, input_bucket_location=None, input_bucket_name=None, output_bucket_location=None, output_bucket_name=None, batch_id=None, document_counts=None, status=None, created=None, updated=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.

class FunctionEnum[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=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.

class BodyCells(*, cell_id=None, location=None, text=None, row_index_begin=None, row_index_end=None, column_index_begin=None, column_index_end=None, row_header_ids=None, row_header_texts=None, row_header_texts_normalized=None, column_header_ids=None, column_header_texts=None, column_header_texts_normalized=None, attributes=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)

class Category(*, label=None, provenance_ids=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.

class LabelEnum[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=None)[source]

Bases: object

Information defining an element’s subject matter.

Attr str label

(optional) The category of the associated element.

class LabelEnum[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=None, model_id=None, model_version=None, elements=None, effective_dates=None, contract_amounts=None, termination_dates=None, contract_types=None, contract_terms=None, payment_terms=None, contract_currencies=None, tables=None, document_structure=None, 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.

class ColumnHeaders(*, cell_id=None, location=None, text=None, text_normalized=None, row_index_begin=None, row_index_end=None, column_index_begin=None, column_index_end=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.

class CompareReturn(*, model_id=None, model_version=None, documents=None, aligned_elements=None, unaligned_elements=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.

class Contact(*, name=None, role=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.

class Contexts(*, text=None, 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.

class ContractAmts(*, confidence_level=None, text=None, text_normalized=None, interpretation=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the contract amount.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractCurrencies(*, confidence_level=None, text=None, text_normalized=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the contract currency.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractTerms(*, confidence_level=None, text=None, text_normalized=None, interpretation=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the contract term.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class ContractTypes(*, confidence_level=None, text=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the contract type.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class DocCounts(*, total=None, pending=None, successful=None, failed=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.

class DocInfo(*, html=None, title=None, hash=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.

class DocStructure(*, section_titles=None, leading_sentences=None, 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.

class Document(*, title=None, html=None, hash=None, label=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.

class EffectiveDates(*, confidence_level=None, text=None, text_normalized=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the effective date.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class Element(*, location=None, text=None, types=None, categories=None, attributes=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.

class ElementLocations(*, begin=None, end=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.

class ElementPair(*, document_label=None, text=None, location=None, types=None, categories=None, attributes=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.

class FeedbackDataInput(feedback_type, location, text, original_labels, updated_labels, *, document=None, model_id=None, model_version=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.

class FeedbackDataOutput(*, feedback_type=None, document=None, model_id=None, model_version=None, location=None, text=None, original_labels=None, updated_labels=None, 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.

class FeedbackDeleted(*, status=None, message=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.

class FeedbackList(*, feedback=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.

class FeedbackReturn(*, feedback_id=None, user_id=None, comment=None, created=None, feedback_data=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.

class GetFeedback(*, feedback_id=None, created=None, comment=None, feedback_data=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.

class HTMLReturn(*, num_pages=None, author=None, publication_date=None, title=None, html=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.

class Interpretation(*, value=None, numeric_value=None, unit=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.

class Key(*, cell_id=None, location=None, text=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.

class KeyValuePair(*, key=None, 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.

class Label(nature, party)[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.

class LeadingSentence(*, text=None, location=None, element_locations=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.

class Location(begin, end)[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.

class Mention(*, text=None, 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.

class OriginalLabelsIn(types, categories)[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.

class OriginalLabelsOut(*, types=None, categories=None, modification=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.

class ModificationEnum[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=None, next_cursor=None, refresh_url=None, next_url=None, total=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.

class Paragraphs(*, 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.

class Parties(*, party=None, role=None, importance=None, addresses=None, contacts=None, mentions=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.

class ImportanceEnum[source]

Bases: enum.Enum

A string that identifies the importance of the party.

PRIMARY = 'Primary'
UNKNOWN = 'Unknown'
class PaymentTerms(*, confidence_level=None, text=None, text_normalized=None, interpretation=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the payment term.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class RowHeaders(*, cell_id=None, location=None, text=None, text_normalized=None, row_index_begin=None, row_index_end=None, column_index_begin=None, column_index_end=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.

class SectionTitle(*, text=None, 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.

class SectionTitles(*, text=None, location=None, level=None, element_locations=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.

class ShortDoc(*, title=None, hash=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.

class TableHeaders(*, cell_id=None, location=None, text=None, row_index_begin=None, row_index_end=None, column_index_begin=None, column_index_end=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.

class TableReturn(*, document=None, model_id=None, model_version=None, 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.

class TableTitle(*, location=None, text=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.

class Tables(*, location=None, text=None, section_title=None, title=None, table_headers=None, row_headers=None, column_headers=None, body_cells=None, contexts=None, key_value_pairs=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.

class TerminationDates(*, confidence_level=None, text=None, text_normalized=None, provenance_ids=None, 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.

class ConfidenceLevelEnum[source]

Bases: enum.Enum

The confidence level in the identification of the termination date.

HIGH = 'High'
MEDIUM = 'Medium'
LOW = 'Low'
class TypeLabel(*, label=None, provenance_ids=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.

class TypeLabelComparison(*, 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.

class UnalignedElement(*, document_label=None, location=None, text=None, types=None, categories=None, attributes=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.

class UpdatedLabelsIn(types, categories)[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.

class UpdatedLabelsOut(*, types=None, categories=None, modification=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.

class ModificationEnum[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=None, location=None, text=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.