Documentation
¶
Overview ¶
Package comparecomplyv1 : Operations and models for the CompareComplyV1 service
Index ¶
- Constants
- type AddFeedbackOptions
- func (options *AddFeedbackOptions) SetComment(comment string) *AddFeedbackOptions
- func (options *AddFeedbackOptions) SetFeedbackData(feedbackData *FeedbackDataInput) *AddFeedbackOptions
- func (options *AddFeedbackOptions) SetHeaders(param map[string]string) *AddFeedbackOptions
- func (options *AddFeedbackOptions) SetUserID(userID string) *AddFeedbackOptions
- type Address
- type AlignedElement
- type Attribute
- type BatchStatus
- type Batches
- type BodyCells
- type Category
- type CategoryComparison
- type ClassifyElementsOptions
- func (options *ClassifyElementsOptions) SetFile(file io.ReadCloser) *ClassifyElementsOptions
- func (options *ClassifyElementsOptions) SetFileContentType(fileContentType string) *ClassifyElementsOptions
- func (options *ClassifyElementsOptions) SetHeaders(param map[string]string) *ClassifyElementsOptions
- func (options *ClassifyElementsOptions) SetModel(model string) *ClassifyElementsOptions
- type ClassifyReturn
- type ColumnHeaders
- type CompareComplyV1
- func (compareComply *CompareComplyV1) AddFeedback(addFeedbackOptions *AddFeedbackOptions) (result *FeedbackReturn, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) ClassifyElements(classifyElementsOptions *ClassifyElementsOptions) (result *ClassifyReturn, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) CompareDocuments(compareDocumentsOptions *CompareDocumentsOptions) (result *CompareReturn, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) ConvertToHTML(convertToHTMLOptions *ConvertToHTMLOptions) (result *HTMLReturn, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) CreateBatch(createBatchOptions *CreateBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) DeleteFeedback(deleteFeedbackOptions *DeleteFeedbackOptions) (result *FeedbackDeleted, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) DisableSSLVerification()
- func (compareComply *CompareComplyV1) ExtractTables(extractTablesOptions *ExtractTablesOptions) (result *TableReturn, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) GetBatch(getBatchOptions *GetBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) GetFeedback(getFeedbackOptions *GetFeedbackOptions) (result *GetFeedback, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) ListBatches(listBatchesOptions *ListBatchesOptions) (result *Batches, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) ListFeedback(listFeedbackOptions *ListFeedbackOptions) (result *FeedbackList, response *core.DetailedResponse, err error)
- func (compareComply *CompareComplyV1) NewAddFeedbackOptions(feedbackData *FeedbackDataInput) *AddFeedbackOptions
- func (compareComply *CompareComplyV1) NewClassifyElementsOptions(file io.ReadCloser) *ClassifyElementsOptions
- func (compareComply *CompareComplyV1) NewCompareDocumentsOptions(file1 io.ReadCloser, file2 io.ReadCloser) *CompareDocumentsOptions
- func (compareComply *CompareComplyV1) NewConvertToHTMLOptions(file io.ReadCloser) *ConvertToHTMLOptions
- func (compareComply *CompareComplyV1) NewCreateBatchOptions(function string, inputCredentialsFile io.ReadCloser, ...) *CreateBatchOptions
- func (compareComply *CompareComplyV1) NewDeleteFeedbackOptions(feedbackID string) *DeleteFeedbackOptions
- func (compareComply *CompareComplyV1) NewExtractTablesOptions(file io.ReadCloser) *ExtractTablesOptions
- func (compareComply *CompareComplyV1) NewFeedbackDataInput(feedbackType string, location *Location, text string, ...) (model *FeedbackDataInput, err error)
- func (compareComply *CompareComplyV1) NewGetBatchOptions(batchID string) *GetBatchOptions
- func (compareComply *CompareComplyV1) NewGetFeedbackOptions(feedbackID string) *GetFeedbackOptions
- func (compareComply *CompareComplyV1) NewLabel(nature string, party string) (model *Label, err error)
- func (compareComply *CompareComplyV1) NewListBatchesOptions() *ListBatchesOptions
- func (compareComply *CompareComplyV1) NewListFeedbackOptions() *ListFeedbackOptions
- func (compareComply *CompareComplyV1) NewLocation(begin int64, end int64) (model *Location, err error)
- func (compareComply *CompareComplyV1) NewOriginalLabelsIn(types []TypeLabel, categories []Category) (model *OriginalLabelsIn, err error)
- func (compareComply *CompareComplyV1) NewUpdateBatchOptions(batchID string, action string) *UpdateBatchOptions
- func (compareComply *CompareComplyV1) NewUpdatedLabelsIn(types []TypeLabel, categories []Category) (model *UpdatedLabelsIn, err error)
- func (compareComply *CompareComplyV1) SetServiceURL(url string) error
- func (compareComply *CompareComplyV1) UpdateBatch(updateBatchOptions *UpdateBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
- type CompareComplyV1Options
- type CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile1(file1 io.ReadCloser) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile1ContentType(file1ContentType string) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile1Label(file1Label string) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile2(file2 io.ReadCloser) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile2ContentType(file2ContentType string) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetFile2Label(file2Label string) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetHeaders(param map[string]string) *CompareDocumentsOptions
- func (options *CompareDocumentsOptions) SetModel(model string) *CompareDocumentsOptions
- type CompareReturn
- type Contact
- type Contexts
- type ContractAmts
- type ContractCurrencies
- type ContractTerms
- type ContractTypes
- type ConvertToHTMLOptions
- func (options *ConvertToHTMLOptions) SetFile(file io.ReadCloser) *ConvertToHTMLOptions
- func (options *ConvertToHTMLOptions) SetFileContentType(fileContentType string) *ConvertToHTMLOptions
- func (options *ConvertToHTMLOptions) SetHeaders(param map[string]string) *ConvertToHTMLOptions
- func (options *ConvertToHTMLOptions) SetModel(model string) *ConvertToHTMLOptions
- type CreateBatchOptions
- func (options *CreateBatchOptions) SetFunction(function string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetHeaders(param map[string]string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetInputBucketLocation(inputBucketLocation string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetInputBucketName(inputBucketName string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetInputCredentialsFile(inputCredentialsFile io.ReadCloser) *CreateBatchOptions
- func (options *CreateBatchOptions) SetModel(model string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetOutputBucketLocation(outputBucketLocation string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetOutputBucketName(outputBucketName string) *CreateBatchOptions
- func (options *CreateBatchOptions) SetOutputCredentialsFile(outputCredentialsFile io.ReadCloser) *CreateBatchOptions
- type DeleteFeedbackOptions
- type DocCounts
- type DocInfo
- type DocStructure
- type Document
- type EffectiveDates
- type Element
- type ElementLocations
- type ElementPair
- type ExtractTablesOptions
- func (options *ExtractTablesOptions) SetFile(file io.ReadCloser) *ExtractTablesOptions
- func (options *ExtractTablesOptions) SetFileContentType(fileContentType string) *ExtractTablesOptions
- func (options *ExtractTablesOptions) SetHeaders(param map[string]string) *ExtractTablesOptions
- func (options *ExtractTablesOptions) SetModel(model string) *ExtractTablesOptions
- type FeedbackDataInput
- type FeedbackDataOutput
- type FeedbackDeleted
- type FeedbackList
- type FeedbackReturn
- type GetBatchOptions
- type GetFeedback
- type GetFeedbackOptions
- type HTMLReturn
- type Interpretation
- type Key
- type KeyValuePair
- type Label
- type LeadingSentence
- type ListBatchesOptions
- type ListFeedbackOptions
- func (options *ListFeedbackOptions) SetAfter(after *strfmt.Date) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetBefore(before *strfmt.Date) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetCategoryAdded(categoryAdded string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetCategoryNotChanged(categoryNotChanged string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetCategoryRemoved(categoryRemoved string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetCursor(cursor string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetDocumentTitle(documentTitle string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetFeedbackType(feedbackType string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetHeaders(param map[string]string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetIncludeTotal(includeTotal bool) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetModelID(modelID string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetModelVersion(modelVersion string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetPageLimit(pageLimit int64) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetSort(sort string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetTypeAdded(typeAdded string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetTypeNotChanged(typeNotChanged string) *ListFeedbackOptions
- func (options *ListFeedbackOptions) SetTypeRemoved(typeRemoved string) *ListFeedbackOptions
- type Location
- type Mention
- type OriginalLabelsIn
- type OriginalLabelsOut
- type Pagination
- type Paragraphs
- type Parties
- type PaymentTerms
- type RowHeaders
- type SectionTitle
- type SectionTitles
- type ShortDoc
- type TableHeaders
- type TableReturn
- type TableTitle
- type Tables
- type TerminationDates
- type TypeLabel
- type TypeLabelComparison
- type UnalignedElement
- type UpdateBatchOptions
- func (options *UpdateBatchOptions) SetAction(action string) *UpdateBatchOptions
- func (options *UpdateBatchOptions) SetBatchID(batchID string) *UpdateBatchOptions
- func (options *UpdateBatchOptions) SetHeaders(param map[string]string) *UpdateBatchOptions
- func (options *UpdateBatchOptions) SetModel(model string) *UpdateBatchOptions
- type UpdatedLabelsIn
- type UpdatedLabelsOut
- type Value
Constants ¶
const ( Attribute_Type_Currency = "Currency" Attribute_Type_Datetime = "DateTime" Attribute_Type_Definedterm = "DefinedTerm" Attribute_Type_Duration = "Duration" Attribute_Type_Location = "Location" Attribute_Type_Number = "Number" Attribute_Type_Organization = "Organization" Attribute_Type_Percentage = "Percentage" Attribute_Type_Person = "Person" )
Constants associated with the Attribute.Type property. The type of attribute.
const ( BatchStatus_Function_ElementClassification = "element_classification" BatchStatus_Function_HTMLConversion = "html_conversion" BatchStatus_Function_Tables = "tables" )
Constants associated with the BatchStatus.Function property. The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, and `tables`.
const ( Category_Label_Amendments = "Amendments" Category_Label_AssetUse = "Asset Use" Category_Label_Assignments = "Assignments" Category_Label_Audits = "Audits" Category_Label_BusinessContinuity = "Business Continuity" Category_Label_Communication = "Communication" Category_Label_Confidentiality = "Confidentiality" Category_Label_Deliverables = "Deliverables" Category_Label_Delivery = "Delivery" Category_Label_DisputeResolution = "Dispute Resolution" Category_Label_ForceMajeure = "Force Majeure" Category_Label_Indemnification = "Indemnification" Category_Label_Insurance = "Insurance" Category_Label_IntellectualProperty = "Intellectual Property" Category_Label_Liability = "Liability" Category_Label_OrderOfPrecedence = "Order of Precedence" Category_Label_PaymentTermsBilling = "Payment Terms & Billing" Category_Label_PricingTaxes = "Pricing & Taxes" Category_Label_Privacy = "Privacy" Category_Label_Responsibilities = "Responsibilities" Category_Label_SafetyAndSecurity = "Safety and Security" Category_Label_ScopeOfWork = "Scope of Work" Category_Label_Subcontracts = "Subcontracts" Category_Label_TermTermination = "Term & Termination" Category_Label_Warranties = "Warranties" )
Constants associated with the Category.Label property. The category of the associated element.
const ( CategoryComparison_Label_Amendments = "Amendments" CategoryComparison_Label_AssetUse = "Asset Use" CategoryComparison_Label_Assignments = "Assignments" CategoryComparison_Label_Audits = "Audits" CategoryComparison_Label_BusinessContinuity = "Business Continuity" CategoryComparison_Label_Communication = "Communication" CategoryComparison_Label_Confidentiality = "Confidentiality" CategoryComparison_Label_Deliverables = "Deliverables" CategoryComparison_Label_Delivery = "Delivery" CategoryComparison_Label_DisputeResolution = "Dispute Resolution" CategoryComparison_Label_ForceMajeure = "Force Majeure" CategoryComparison_Label_Indemnification = "Indemnification" CategoryComparison_Label_Insurance = "Insurance" CategoryComparison_Label_IntellectualProperty = "Intellectual Property" CategoryComparison_Label_Liability = "Liability" CategoryComparison_Label_OrderOfPrecedence = "Order of Precedence" CategoryComparison_Label_PaymentTermsBilling = "Payment Terms & Billing" CategoryComparison_Label_PricingTaxes = "Pricing & Taxes" CategoryComparison_Label_Privacy = "Privacy" CategoryComparison_Label_Responsibilities = "Responsibilities" CategoryComparison_Label_SafetyAndSecurity = "Safety and Security" CategoryComparison_Label_ScopeOfWork = "Scope of Work" CategoryComparison_Label_Subcontracts = "Subcontracts" CategoryComparison_Label_TermTermination = "Term & Termination" CategoryComparison_Label_Warranties = "Warranties" )
Constants associated with the CategoryComparison.Label property. The category of the associated element.
const ( ClassifyElementsOptions_Model_Contracts = "contracts" ClassifyElementsOptions_Model_Tables = "tables" )
Constants associated with the ClassifyElementsOptions.Model property. 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.
const ( CompareDocumentsOptions_Model_Contracts = "contracts" CompareDocumentsOptions_Model_Tables = "tables" )
Constants associated with the CompareDocumentsOptions.Model property. 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.
const ( ContractAmts_ConfidenceLevel_High = "High" ContractAmts_ConfidenceLevel_Low = "Low" ContractAmts_ConfidenceLevel_Medium = "Medium" )
Constants associated with the ContractAmts.ConfidenceLevel property. The confidence level in the identification of the contract amount.
const ( ContractCurrencies_ConfidenceLevel_High = "High" ContractCurrencies_ConfidenceLevel_Low = "Low" ContractCurrencies_ConfidenceLevel_Medium = "Medium" )
Constants associated with the ContractCurrencies.ConfidenceLevel property. The confidence level in the identification of the contract currency.
const ( ContractTerms_ConfidenceLevel_High = "High" ContractTerms_ConfidenceLevel_Low = "Low" ContractTerms_ConfidenceLevel_Medium = "Medium" )
Constants associated with the ContractTerms.ConfidenceLevel property. The confidence level in the identification of the contract term.
const ( ContractTypes_ConfidenceLevel_High = "High" ContractTypes_ConfidenceLevel_Low = "Low" ContractTypes_ConfidenceLevel_Medium = "Medium" )
Constants associated with the ContractTypes.ConfidenceLevel property. The confidence level in the identification of the contract type.
const ( ConvertToHTMLOptions_Model_Contracts = "contracts" ConvertToHTMLOptions_Model_Tables = "tables" )
Constants associated with the ConvertToHTMLOptions.Model property. 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.
const ( CreateBatchOptions_Function_ElementClassification = "element_classification" CreateBatchOptions_Function_HTMLConversion = "html_conversion" CreateBatchOptions_Function_Tables = "tables" )
Constants associated with the CreateBatchOptions.Function property. The Compare and Comply method to run across the submitted input documents.
const ( CreateBatchOptions_Model_Contracts = "contracts" CreateBatchOptions_Model_Tables = "tables" )
Constants associated with the CreateBatchOptions.Model property. 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.
const ( DeleteFeedbackOptions_Model_Contracts = "contracts" DeleteFeedbackOptions_Model_Tables = "tables" )
Constants associated with the DeleteFeedbackOptions.Model property. 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.
const ( EffectiveDates_ConfidenceLevel_High = "High" EffectiveDates_ConfidenceLevel_Low = "Low" EffectiveDates_ConfidenceLevel_Medium = "Medium" )
Constants associated with the EffectiveDates.ConfidenceLevel property. The confidence level in the identification of the effective date.
const ( ExtractTablesOptions_Model_Contracts = "contracts" ExtractTablesOptions_Model_Tables = "tables" )
Constants associated with the ExtractTablesOptions.Model property. 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.
const ( GetFeedbackOptions_Model_Contracts = "contracts" GetFeedbackOptions_Model_Tables = "tables" )
Constants associated with the GetFeedbackOptions.Model property. 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.
const ( OriginalLabelsOut_Modification_Added = "added" OriginalLabelsOut_Modification_NotChanged = "not_changed" OriginalLabelsOut_Modification_Removed = "removed" )
Constants associated with the OriginalLabelsOut.Modification property. A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible values are `added`, `not_changed`, and `removed`.
const ( Parties_Importance_Primary = "Primary" Parties_Importance_Unknown = "Unknown" )
Constants associated with the Parties.Importance property. A string that identifies the importance of the party.
const ( PaymentTerms_ConfidenceLevel_High = "High" PaymentTerms_ConfidenceLevel_Low = "Low" PaymentTerms_ConfidenceLevel_Medium = "Medium" )
Constants associated with the PaymentTerms.ConfidenceLevel property. The confidence level in the identification of the payment term.
const ( TerminationDates_ConfidenceLevel_High = "High" TerminationDates_ConfidenceLevel_Low = "Low" TerminationDates_ConfidenceLevel_Medium = "Medium" )
Constants associated with the TerminationDates.ConfidenceLevel property. The confidence level in the identification of the termination date.
const ( UpdateBatchOptions_Action_Cancel = "cancel" UpdateBatchOptions_Action_Rescan = "rescan" )
Constants associated with the UpdateBatchOptions.Action property. The action you want to perform on the specified batch-processing job.
const ( UpdateBatchOptions_Model_Contracts = "contracts" UpdateBatchOptions_Model_Tables = "tables" )
Constants associated with the UpdateBatchOptions.Model property. 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.
const ( UpdatedLabelsOut_Modification_Added = "added" UpdatedLabelsOut_Modification_NotChanged = "not_changed" UpdatedLabelsOut_Modification_Removed = "removed" )
Constants associated with the UpdatedLabelsOut.Modification property. The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`, `not_changed`, and `removed`.
const DefaultServiceName = "compare-comply"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://api.us-south.compare-comply.watson.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddFeedbackOptions ¶
type AddFeedbackOptions struct {
// Feedback data for submission.
FeedbackData *FeedbackDataInput `json:"feedback_data" validate:"required"`
// An optional string identifying the user.
UserID *string `json:"user_id,omitempty"`
// An optional comment on or description of the feedback.
Comment *string `json:"comment,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
AddFeedbackOptions : The AddFeedback options.
func (*AddFeedbackOptions) SetComment ¶
func (options *AddFeedbackOptions) SetComment(comment string) *AddFeedbackOptions
SetComment : Allow user to set Comment
func (*AddFeedbackOptions) SetFeedbackData ¶
func (options *AddFeedbackOptions) SetFeedbackData(feedbackData *FeedbackDataInput) *AddFeedbackOptions
SetFeedbackData : Allow user to set FeedbackData
func (*AddFeedbackOptions) SetHeaders ¶
func (options *AddFeedbackOptions) SetHeaders(param map[string]string) *AddFeedbackOptions
SetHeaders : Allow user to set Headers
func (*AddFeedbackOptions) SetUserID ¶
func (options *AddFeedbackOptions) SetUserID(userID string) *AddFeedbackOptions
SetUserID : Allow user to set UserID
type Address ¶
type Address struct {
// A string listing the address.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
Address : A party's address.
type AlignedElement ¶
type AlignedElement struct {
// Identifies two elements that semantically align between the compared documents.
ElementPair []ElementPair `json:"element_pair,omitempty"`
// 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.
IdenticalText *bool `json:"identical_text,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// Indicates that the elements aligned are contractual clauses of significance.
SignificantElements *bool `json:"significant_elements,omitempty"`
}
AlignedElement : AlignedElement struct
type Attribute ¶
type Attribute struct {
// The type of attribute.
Type *string `json:"type,omitempty"`
// The text associated with the attribute.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
Attribute : List of document attributes.
type BatchStatus ¶
type BatchStatus struct {
// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, and
// `tables`.
Function *string `json:"function,omitempty"`
// 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`.
InputBucketLocation *string `json:"input_bucket_location,omitempty"`
// The name of the Cloud Object Storage input bucket.
InputBucketName *string `json:"input_bucket_name,omitempty"`
// 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`.
OutputBucketLocation *string `json:"output_bucket_location,omitempty"`
// The name of the Cloud Object Storage output bucket.
OutputBucketName *string `json:"output_bucket_name,omitempty"`
// The unique identifier for the batch request.
BatchID *string `json:"batch_id,omitempty"`
// Document counts.
DocumentCounts *DocCounts `json:"document_counts,omitempty"`
// The status of the batch request.
Status *string `json:"status,omitempty"`
// The creation time of the batch request.
Created *strfmt.DateTime `json:"created,omitempty"`
// The time of the most recent update to the batch request.
Updated *strfmt.DateTime `json:"updated,omitempty"`
}
BatchStatus : The batch-request status.
type Batches ¶
type Batches struct {
// A list of the status of all batch requests.
Batches []BatchStatus `json:"batches,omitempty"`
}
Batches : The results of a successful **List Batches** request.
type BodyCells ¶
type BodyCells struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
// An array that contains the `id` value of a row header that is applicable to this body cell.
RowHeaderIds []string `json:"row_header_ids,omitempty"`
// An array that contains the `text` value of a row header that is applicable to this body cell.
RowHeaderTexts []string `json:"row_header_texts,omitempty"`
// 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`.
RowHeaderTextsNormalized []string `json:"row_header_texts_normalized,omitempty"`
// An array that contains the `id` value of a column header that is applicable to the current cell.
ColumnHeaderIds []string `json:"column_header_ids,omitempty"`
// An array that contains the `text` value of a column header that is applicable to the current cell.
ColumnHeaderTexts []string `json:"column_header_texts,omitempty"`
// 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`.
ColumnHeaderTextsNormalized []string `json:"column_header_texts_normalized,omitempty"`
Attributes []Attribute `json:"attributes,omitempty"`
}
BodyCells : Cells that are not table header, column header, or row header cells.
type Category ¶
type Category struct {
// The category of the associated element.
Label *string `json:"label,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
}
Category : Information defining an element's subject matter.
type CategoryComparison ¶ added in v0.7.0
type CategoryComparison struct {
// The category of the associated element.
Label *string `json:"label,omitempty"`
}
CategoryComparison : Information defining an element's subject matter.
type ClassifyElementsOptions ¶
type ClassifyElementsOptions struct {
// The document to classify.
File io.ReadCloser `json:"file" validate:"required"`
// The content type of file.
FileContentType *string `json:"file_content_type,omitempty"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ClassifyElementsOptions : The ClassifyElements options.
func (*ClassifyElementsOptions) SetFile ¶
func (options *ClassifyElementsOptions) SetFile(file io.ReadCloser) *ClassifyElementsOptions
SetFile : Allow user to set File
func (*ClassifyElementsOptions) SetFileContentType ¶
func (options *ClassifyElementsOptions) SetFileContentType(fileContentType string) *ClassifyElementsOptions
SetFileContentType : Allow user to set FileContentType
func (*ClassifyElementsOptions) SetHeaders ¶
func (options *ClassifyElementsOptions) SetHeaders(param map[string]string) *ClassifyElementsOptions
SetHeaders : Allow user to set Headers
func (*ClassifyElementsOptions) SetModel ¶ added in v0.7.0
func (options *ClassifyElementsOptions) SetModel(model string) *ClassifyElementsOptions
SetModel : Allow user to set Model
type ClassifyReturn ¶
type ClassifyReturn struct {
// Basic information about the input document.
Document *Document `json:"document,omitempty"`
// The analysis model used to classify the input document. For the **Element classification** method, the only valid
// value is `contracts`.
ModelID *string `json:"model_id,omitempty"`
// The version of the analysis model identified by the value of the `model_id` key.
ModelVersion *string `json:"model_version,omitempty"`
// Document elements identified by the service.
Elements []Element `json:"elements,omitempty"`
// The date or dates on which the document becomes effective.
EffectiveDates []EffectiveDates `json:"effective_dates,omitempty"`
// The monetary amounts that identify the total amount of the contract that needs to be paid from one party to another.
ContractAmounts []ContractAmts `json:"contract_amounts,omitempty"`
// The dates on which the document is to be terminated.
TerminationDates []TerminationDates `json:"termination_dates,omitempty"`
// The contract type as declared in the document.
ContractTypes []ContractTypes `json:"contract_types,omitempty"`
// The durations of the contract.
ContractTerms []ContractTerms `json:"contract_terms,omitempty"`
// The document's payment durations.
PaymentTerms []PaymentTerms `json:"payment_terms,omitempty"`
// The contract currencies as declared in the document.
ContractCurrencies []ContractCurrencies `json:"contract_currencies,omitempty"`
// Definition of tables identified in the input document.
Tables []Tables `json:"tables,omitempty"`
// The structure of the input document.
DocumentStructure *DocStructure `json:"document_structure,omitempty"`
// Definitions of the parties identified in the input document.
Parties []Parties `json:"parties,omitempty"`
}
ClassifyReturn : The analysis of objects returned by the **Element classification** method.
type ColumnHeaders ¶
type ColumnHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The location of the column header cell in the current table as defined by its `begin` and `end` offsets,
// respectfully, in the input document.
Location interface{} `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// If you provide customization input, the normalized version of the cell text according to the customization;
// otherwise, the same value as `text`.
TextNormalized *string `json:"text_normalized,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
ColumnHeaders : Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.
type CompareComplyV1 ¶
type CompareComplyV1 struct {
Service *core.BaseService
Version string
}
CompareComplyV1 : IBM Watson™ Compare and Comply analyzes governing documents to provide details about critical aspects of the documents.
Version: 1.0 See: https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-about
func NewCompareComplyV1 ¶
func NewCompareComplyV1(options *CompareComplyV1Options) (service *CompareComplyV1, err error)
NewCompareComplyV1 : constructs an instance of CompareComplyV1 with passed in options.
func (*CompareComplyV1) AddFeedback ¶
func (compareComply *CompareComplyV1) AddFeedback(addFeedbackOptions *AddFeedbackOptions) (result *FeedbackReturn, response *core.DetailedResponse, err error)
AddFeedback : 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.
func (*CompareComplyV1) ClassifyElements ¶
func (compareComply *CompareComplyV1) ClassifyElements(classifyElementsOptions *ClassifyElementsOptions) (result *ClassifyReturn, response *core.DetailedResponse, err error)
ClassifyElements : Classify the elements of a document Analyzes the structural and semantic elements of a document.
func (*CompareComplyV1) CompareDocuments ¶
func (compareComply *CompareComplyV1) CompareDocuments(compareDocumentsOptions *CompareDocumentsOptions) (result *CompareReturn, response *core.DetailedResponse, err error)
CompareDocuments : Compare two documents Compares two input documents. Documents must be in the same format.
func (*CompareComplyV1) ConvertToHTML ¶
func (compareComply *CompareComplyV1) ConvertToHTML(convertToHTMLOptions *ConvertToHTMLOptions) (result *HTMLReturn, response *core.DetailedResponse, err error)
ConvertToHTML : Convert document to HTML Converts a document to HTML.
func (*CompareComplyV1) CreateBatch ¶
func (compareComply *CompareComplyV1) CreateBatch(createBatchOptions *CreateBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
CreateBatch : 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).
func (*CompareComplyV1) DeleteFeedback ¶
func (compareComply *CompareComplyV1) DeleteFeedback(deleteFeedbackOptions *DeleteFeedbackOptions) (result *FeedbackDeleted, response *core.DetailedResponse, err error)
DeleteFeedback : Delete a specified feedback entry Deletes a feedback entry with a specified `feedback_id`.
func (*CompareComplyV1) DisableSSLVerification ¶ added in v1.0.0
func (compareComply *CompareComplyV1) DisableSSLVerification()
DisableSSLVerification bypasses verification of the server's SSL certificate
func (*CompareComplyV1) ExtractTables ¶
func (compareComply *CompareComplyV1) ExtractTables(extractTablesOptions *ExtractTablesOptions) (result *TableReturn, response *core.DetailedResponse, err error)
ExtractTables : Extract a document's tables Analyzes the tables in a document.
func (*CompareComplyV1) GetBatch ¶
func (compareComply *CompareComplyV1) GetBatch(getBatchOptions *GetBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
GetBatch : Get information about a specific batch-processing job Gets information about a batch-processing job with a specified ID.
func (*CompareComplyV1) GetFeedback ¶
func (compareComply *CompareComplyV1) GetFeedback(getFeedbackOptions *GetFeedbackOptions) (result *GetFeedback, response *core.DetailedResponse, err error)
GetFeedback : Get a specified feedback entry Gets a feedback entry with a specified `feedback_id`.
func (*CompareComplyV1) ListBatches ¶
func (compareComply *CompareComplyV1) ListBatches(listBatchesOptions *ListBatchesOptions) (result *Batches, response *core.DetailedResponse, err error)
ListBatches : List submitted batch-processing jobs Lists batch-processing jobs submitted by users.
func (*CompareComplyV1) ListFeedback ¶
func (compareComply *CompareComplyV1) ListFeedback(listFeedbackOptions *ListFeedbackOptions) (result *FeedbackList, response *core.DetailedResponse, err error)
ListFeedback : List the feedback in a document Lists the feedback in a document.
func (*CompareComplyV1) NewAddFeedbackOptions ¶
func (compareComply *CompareComplyV1) NewAddFeedbackOptions(feedbackData *FeedbackDataInput) *AddFeedbackOptions
NewAddFeedbackOptions : Instantiate AddFeedbackOptions
func (*CompareComplyV1) NewClassifyElementsOptions ¶
func (compareComply *CompareComplyV1) NewClassifyElementsOptions(file io.ReadCloser) *ClassifyElementsOptions
NewClassifyElementsOptions : Instantiate ClassifyElementsOptions
func (*CompareComplyV1) NewCompareDocumentsOptions ¶
func (compareComply *CompareComplyV1) NewCompareDocumentsOptions(file1 io.ReadCloser, file2 io.ReadCloser) *CompareDocumentsOptions
NewCompareDocumentsOptions : Instantiate CompareDocumentsOptions
func (*CompareComplyV1) NewConvertToHTMLOptions ¶
func (compareComply *CompareComplyV1) NewConvertToHTMLOptions(file io.ReadCloser) *ConvertToHTMLOptions
NewConvertToHTMLOptions : Instantiate ConvertToHTMLOptions
func (*CompareComplyV1) NewCreateBatchOptions ¶
func (compareComply *CompareComplyV1) NewCreateBatchOptions(function string, inputCredentialsFile io.ReadCloser, inputBucketLocation string, inputBucketName string, outputCredentialsFile io.ReadCloser, outputBucketLocation string, outputBucketName string) *CreateBatchOptions
NewCreateBatchOptions : Instantiate CreateBatchOptions
func (*CompareComplyV1) NewDeleteFeedbackOptions ¶
func (compareComply *CompareComplyV1) NewDeleteFeedbackOptions(feedbackID string) *DeleteFeedbackOptions
NewDeleteFeedbackOptions : Instantiate DeleteFeedbackOptions
func (*CompareComplyV1) NewExtractTablesOptions ¶
func (compareComply *CompareComplyV1) NewExtractTablesOptions(file io.ReadCloser) *ExtractTablesOptions
NewExtractTablesOptions : Instantiate ExtractTablesOptions
func (*CompareComplyV1) NewFeedbackDataInput ¶ added in v1.3.0
func (compareComply *CompareComplyV1) NewFeedbackDataInput(feedbackType string, location *Location, text string, originalLabels *OriginalLabelsIn, updatedLabels *UpdatedLabelsIn) (model *FeedbackDataInput, err error)
NewFeedbackDataInput : Instantiate FeedbackDataInput (Generic Model Constructor)
func (*CompareComplyV1) NewGetBatchOptions ¶
func (compareComply *CompareComplyV1) NewGetBatchOptions(batchID string) *GetBatchOptions
NewGetBatchOptions : Instantiate GetBatchOptions
func (*CompareComplyV1) NewGetFeedbackOptions ¶
func (compareComply *CompareComplyV1) NewGetFeedbackOptions(feedbackID string) *GetFeedbackOptions
NewGetFeedbackOptions : Instantiate GetFeedbackOptions
func (*CompareComplyV1) NewLabel ¶ added in v1.3.0
func (compareComply *CompareComplyV1) NewLabel(nature string, party string) (model *Label, err error)
NewLabel : Instantiate Label (Generic Model Constructor)
func (*CompareComplyV1) NewListBatchesOptions ¶
func (compareComply *CompareComplyV1) NewListBatchesOptions() *ListBatchesOptions
NewListBatchesOptions : Instantiate ListBatchesOptions
func (*CompareComplyV1) NewListFeedbackOptions ¶
func (compareComply *CompareComplyV1) NewListFeedbackOptions() *ListFeedbackOptions
NewListFeedbackOptions : Instantiate ListFeedbackOptions
func (*CompareComplyV1) NewLocation ¶ added in v1.3.0
func (compareComply *CompareComplyV1) NewLocation(begin int64, end int64) (model *Location, err error)
NewLocation : Instantiate Location (Generic Model Constructor)
func (*CompareComplyV1) NewOriginalLabelsIn ¶ added in v1.3.0
func (compareComply *CompareComplyV1) NewOriginalLabelsIn(types []TypeLabel, categories []Category) (model *OriginalLabelsIn, err error)
NewOriginalLabelsIn : Instantiate OriginalLabelsIn (Generic Model Constructor)
func (*CompareComplyV1) NewUpdateBatchOptions ¶
func (compareComply *CompareComplyV1) NewUpdateBatchOptions(batchID string, action string) *UpdateBatchOptions
NewUpdateBatchOptions : Instantiate UpdateBatchOptions
func (*CompareComplyV1) NewUpdatedLabelsIn ¶ added in v1.3.0
func (compareComply *CompareComplyV1) NewUpdatedLabelsIn(types []TypeLabel, categories []Category) (model *UpdatedLabelsIn, err error)
NewUpdatedLabelsIn : Instantiate UpdatedLabelsIn (Generic Model Constructor)
func (*CompareComplyV1) SetServiceURL ¶ added in v1.0.0
func (compareComply *CompareComplyV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*CompareComplyV1) UpdateBatch ¶
func (compareComply *CompareComplyV1) UpdateBatch(updateBatchOptions *UpdateBatchOptions) (result *BatchStatus, response *core.DetailedResponse, err error)
UpdateBatch : 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.
type CompareComplyV1Options ¶
type CompareComplyV1Options struct {
ServiceName string
URL string
Authenticator core.Authenticator
Version string
}
CompareComplyV1Options : Service options
type CompareDocumentsOptions ¶
type CompareDocumentsOptions struct {
// The first document to compare.
File1 io.ReadCloser `json:"file_1" validate:"required"`
// The second document to compare.
File2 io.ReadCloser `json:"file_2" validate:"required"`
// The content type of file1.
File1ContentType *string `json:"file_1_content_type,omitempty"`
// The content type of file2.
File2ContentType *string `json:"file_2_content_type,omitempty"`
// A text label for the first document.
File1Label *string `json:"file_1_label,omitempty"`
// A text label for the second document.
File2Label *string `json:"file_2_label,omitempty"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CompareDocumentsOptions : The CompareDocuments options.
func (*CompareDocumentsOptions) SetFile1 ¶
func (options *CompareDocumentsOptions) SetFile1(file1 io.ReadCloser) *CompareDocumentsOptions
SetFile1 : Allow user to set File1
func (*CompareDocumentsOptions) SetFile1ContentType ¶
func (options *CompareDocumentsOptions) SetFile1ContentType(file1ContentType string) *CompareDocumentsOptions
SetFile1ContentType : Allow user to set File1ContentType
func (*CompareDocumentsOptions) SetFile1Label ¶
func (options *CompareDocumentsOptions) SetFile1Label(file1Label string) *CompareDocumentsOptions
SetFile1Label : Allow user to set File1Label
func (*CompareDocumentsOptions) SetFile2 ¶
func (options *CompareDocumentsOptions) SetFile2(file2 io.ReadCloser) *CompareDocumentsOptions
SetFile2 : Allow user to set File2
func (*CompareDocumentsOptions) SetFile2ContentType ¶
func (options *CompareDocumentsOptions) SetFile2ContentType(file2ContentType string) *CompareDocumentsOptions
SetFile2ContentType : Allow user to set File2ContentType
func (*CompareDocumentsOptions) SetFile2Label ¶
func (options *CompareDocumentsOptions) SetFile2Label(file2Label string) *CompareDocumentsOptions
SetFile2Label : Allow user to set File2Label
func (*CompareDocumentsOptions) SetHeaders ¶
func (options *CompareDocumentsOptions) SetHeaders(param map[string]string) *CompareDocumentsOptions
SetHeaders : Allow user to set Headers
func (*CompareDocumentsOptions) SetModel ¶ added in v0.7.0
func (options *CompareDocumentsOptions) SetModel(model string) *CompareDocumentsOptions
SetModel : Allow user to set Model
type CompareReturn ¶
type CompareReturn struct {
// The analysis model used to compare the input documents. For the **Compare two documents** method, the only valid
// value is `contracts`.
ModelID *string `json:"model_id,omitempty"`
// The version of the analysis model identified by the value of the `model_id` key.
ModelVersion *string `json:"model_version,omitempty"`
// Information about the documents being compared.
Documents []Document `json:"documents,omitempty"`
// A list of pairs of elements that semantically align between the compared documents.
AlignedElements []AlignedElement `json:"aligned_elements,omitempty"`
// A list of elements that do not semantically align between the compared documents.
UnalignedElements []UnalignedElement `json:"unaligned_elements,omitempty"`
}
CompareReturn : The comparison of the two submitted documents.
type Contact ¶
type Contact struct {
// A string listing the name of the contact.
Name *string `json:"name,omitempty"`
// A string listing the role of the contact.
Role *string `json:"role,omitempty"`
}
Contact : A contact.
type Contexts ¶ added in v0.10.0
type Contexts struct {
// The related text.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
Contexts : Text that is related to the contents of the table and that precedes or follows the current table.
type ContractAmts ¶
type ContractAmts struct {
// The confidence level in the identification of the contract amount.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The monetary amount.
Text *string `json:"text,omitempty"`
// The normalized form of the amount, which is listed as a string. This element is optional; it is returned only if
// normalized text exists.
TextNormalized *string `json:"text_normalized,omitempty"`
// The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text
// exists.
Interpretation *Interpretation `json:"interpretation,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
ContractAmts : A monetary amount identified in the input document.
type ContractCurrencies ¶ added in v0.11.0
type ContractCurrencies struct {
// The confidence level in the identification of the contract currency.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The contract currency.
Text *string `json:"text,omitempty"`
// 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.
TextNormalized *string `json:"text_normalized,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
ContractCurrencies : The contract currencies that are declared in the document.
type ContractTerms ¶ added in v0.10.0
type ContractTerms struct {
// The confidence level in the identification of the contract term.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The contract term (duration).
Text *string `json:"text,omitempty"`
// 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.
TextNormalized *string `json:"text_normalized,omitempty"`
// The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text
// exists.
Interpretation *Interpretation `json:"interpretation,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
ContractTerms : The duration or durations of the contract.
type ContractTypes ¶ added in v0.10.0
type ContractTypes struct {
// The confidence level in the identification of the contract type.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The contract type.
Text *string `json:"text,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
ContractTypes : The contract type identified in the input document.
type ConvertToHTMLOptions ¶
type ConvertToHTMLOptions struct {
// The document to convert.
File io.ReadCloser `json:"file" validate:"required"`
// The content type of file.
FileContentType *string `json:"file_content_type,omitempty"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ConvertToHTMLOptions : The ConvertToHTML options.
func (*ConvertToHTMLOptions) SetFile ¶
func (options *ConvertToHTMLOptions) SetFile(file io.ReadCloser) *ConvertToHTMLOptions
SetFile : Allow user to set File
func (*ConvertToHTMLOptions) SetFileContentType ¶
func (options *ConvertToHTMLOptions) SetFileContentType(fileContentType string) *ConvertToHTMLOptions
SetFileContentType : Allow user to set FileContentType
func (*ConvertToHTMLOptions) SetHeaders ¶
func (options *ConvertToHTMLOptions) SetHeaders(param map[string]string) *ConvertToHTMLOptions
SetHeaders : Allow user to set Headers
func (*ConvertToHTMLOptions) SetModel ¶ added in v0.7.0
func (options *ConvertToHTMLOptions) SetModel(model string) *ConvertToHTMLOptions
SetModel : Allow user to set Model
type CreateBatchOptions ¶
type CreateBatchOptions struct {
// The Compare and Comply method to run across the submitted input documents.
Function *string `json:"function" validate:"required"`
// 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.
InputCredentialsFile io.ReadCloser `json:"input_credentials_file" validate:"required"`
// 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`.
InputBucketLocation *string `json:"input_bucket_location" validate:"required"`
// The name of the Cloud Object Storage input bucket.
InputBucketName *string `json:"input_bucket_name" validate:"required"`
// 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.
OutputCredentialsFile io.ReadCloser `json:"output_credentials_file" validate:"required"`
// 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`.
OutputBucketLocation *string `json:"output_bucket_location" validate:"required"`
// The name of the Cloud Object Storage output bucket.
OutputBucketName *string `json:"output_bucket_name" validate:"required"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CreateBatchOptions : The CreateBatch options.
func (*CreateBatchOptions) SetFunction ¶
func (options *CreateBatchOptions) SetFunction(function string) *CreateBatchOptions
SetFunction : Allow user to set Function
func (*CreateBatchOptions) SetHeaders ¶
func (options *CreateBatchOptions) SetHeaders(param map[string]string) *CreateBatchOptions
SetHeaders : Allow user to set Headers
func (*CreateBatchOptions) SetInputBucketLocation ¶
func (options *CreateBatchOptions) SetInputBucketLocation(inputBucketLocation string) *CreateBatchOptions
SetInputBucketLocation : Allow user to set InputBucketLocation
func (*CreateBatchOptions) SetInputBucketName ¶
func (options *CreateBatchOptions) SetInputBucketName(inputBucketName string) *CreateBatchOptions
SetInputBucketName : Allow user to set InputBucketName
func (*CreateBatchOptions) SetInputCredentialsFile ¶
func (options *CreateBatchOptions) SetInputCredentialsFile(inputCredentialsFile io.ReadCloser) *CreateBatchOptions
SetInputCredentialsFile : Allow user to set InputCredentialsFile
func (*CreateBatchOptions) SetModel ¶ added in v0.7.0
func (options *CreateBatchOptions) SetModel(model string) *CreateBatchOptions
SetModel : Allow user to set Model
func (*CreateBatchOptions) SetOutputBucketLocation ¶
func (options *CreateBatchOptions) SetOutputBucketLocation(outputBucketLocation string) *CreateBatchOptions
SetOutputBucketLocation : Allow user to set OutputBucketLocation
func (*CreateBatchOptions) SetOutputBucketName ¶
func (options *CreateBatchOptions) SetOutputBucketName(outputBucketName string) *CreateBatchOptions
SetOutputBucketName : Allow user to set OutputBucketName
func (*CreateBatchOptions) SetOutputCredentialsFile ¶
func (options *CreateBatchOptions) SetOutputCredentialsFile(outputCredentialsFile io.ReadCloser) *CreateBatchOptions
SetOutputCredentialsFile : Allow user to set OutputCredentialsFile
type DeleteFeedbackOptions ¶
type DeleteFeedbackOptions struct {
// A string that specifies the feedback entry to be deleted from the document.
FeedbackID *string `json:"feedback_id" validate:"required"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteFeedbackOptions : The DeleteFeedback options.
func (*DeleteFeedbackOptions) SetFeedbackID ¶
func (options *DeleteFeedbackOptions) SetFeedbackID(feedbackID string) *DeleteFeedbackOptions
SetFeedbackID : Allow user to set FeedbackID
func (*DeleteFeedbackOptions) SetHeaders ¶
func (options *DeleteFeedbackOptions) SetHeaders(param map[string]string) *DeleteFeedbackOptions
SetHeaders : Allow user to set Headers
func (*DeleteFeedbackOptions) SetModel ¶ added in v0.7.0
func (options *DeleteFeedbackOptions) SetModel(model string) *DeleteFeedbackOptions
SetModel : Allow user to set Model
type DocCounts ¶
type DocCounts struct {
// Total number of documents.
Total *int64 `json:"total,omitempty"`
// Number of pending documents.
Pending *int64 `json:"pending,omitempty"`
// Number of documents successfully processed.
Successful *int64 `json:"successful,omitempty"`
// Number of documents not successfully processed.
Failed *int64 `json:"failed,omitempty"`
}
DocCounts : Document counts.
type DocInfo ¶
type DocInfo struct {
// The full text of the parsed document in HTML format.
HTML *string `json:"html,omitempty"`
// The title of the parsed document. If the service did not detect a title, the value of this element is `null`.
Title *string `json:"title,omitempty"`
// The MD5 hash of the input document.
Hash *string `json:"hash,omitempty"`
}
DocInfo : Information about the parsed input document.
type DocStructure ¶
type DocStructure struct {
// An array containing one object per section or subsection identified in the input document.
SectionTitles []SectionTitles `json:"section_titles,omitempty"`
// 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.
LeadingSentences []LeadingSentence `json:"leading_sentences,omitempty"`
// An array containing one object per paragraph, in parallel with the `section_titles` and `leading_sentences` arrays.
Paragraphs []Paragraphs `json:"paragraphs,omitempty"`
}
DocStructure : The structure of the input document.
type Document ¶
type Document struct {
// Document title, if detected.
Title *string `json:"title,omitempty"`
// The input document converted into HTML format.
HTML *string `json:"html,omitempty"`
// The MD5 hash value of the input document.
Hash *string `json:"hash,omitempty"`
// 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.
Label *string `json:"label,omitempty"`
}
Document : Basic information about the input document.
type EffectiveDates ¶
type EffectiveDates struct {
// The confidence level in the identification of the effective date.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The effective date, listed as a string.
Text *string `json:"text,omitempty"`
// 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.
TextNormalized *string `json:"text_normalized,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
EffectiveDates : An effective date.
type Element ¶
type Element struct {
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text of the element.
Text *string `json:"text,omitempty"`
// Description of the action specified by the element and whom it affects.
Types []TypeLabel `json:"types,omitempty"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []Category `json:"categories,omitempty"`
// List of document attributes.
Attributes []Attribute `json:"attributes,omitempty"`
}
Element : A component part of the document.
type ElementLocations ¶
type ElementLocations struct {
// An integer that indicates the starting position of the element in the input document.
Begin *int64 `json:"begin,omitempty"`
// An integer that indicates the ending position of the element in the input document.
End *int64 `json:"end,omitempty"`
}
ElementLocations : A list of `begin` and `end` indexes that indicate the locations of the elements in the input document.
type ElementPair ¶
type ElementPair struct {
// 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.
DocumentLabel *string `json:"document_label,omitempty"`
// The contents of the element.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// Description of the action specified by the element and whom it affects.
Types []TypeLabelComparison `json:"types,omitempty"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []CategoryComparison `json:"categories,omitempty"`
// List of document attributes.
Attributes []Attribute `json:"attributes,omitempty"`
}
ElementPair : Details of semantically aligned elements.
type ExtractTablesOptions ¶
type ExtractTablesOptions struct {
// The document on which to run table extraction.
File io.ReadCloser `json:"file" validate:"required"`
// The content type of file.
FileContentType *string `json:"file_content_type,omitempty"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ExtractTablesOptions : The ExtractTables options.
func (*ExtractTablesOptions) SetFile ¶
func (options *ExtractTablesOptions) SetFile(file io.ReadCloser) *ExtractTablesOptions
SetFile : Allow user to set File
func (*ExtractTablesOptions) SetFileContentType ¶
func (options *ExtractTablesOptions) SetFileContentType(fileContentType string) *ExtractTablesOptions
SetFileContentType : Allow user to set FileContentType
func (*ExtractTablesOptions) SetHeaders ¶
func (options *ExtractTablesOptions) SetHeaders(param map[string]string) *ExtractTablesOptions
SetHeaders : Allow user to set Headers
func (*ExtractTablesOptions) SetModel ¶ added in v0.7.0
func (options *ExtractTablesOptions) SetModel(model string) *ExtractTablesOptions
SetModel : Allow user to set Model
type FeedbackDataInput ¶
type FeedbackDataInput struct {
// The type of feedback. The only permitted value is `element_classification`.
FeedbackType *string `json:"feedback_type" validate:"required"`
// Brief information about the input document.
Document *ShortDoc `json:"document,omitempty"`
// An optional string identifying the model ID. The only permitted value is `contracts`.
ModelID *string `json:"model_id,omitempty"`
// An optional string identifying the version of the model used.
ModelVersion *string `json:"model_version,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location" validate:"required"`
// The text on which to submit feedback.
Text *string `json:"text" validate:"required"`
// The original labeling from the input document, without the submitted feedback.
OriginalLabels *OriginalLabelsIn `json:"original_labels" validate:"required"`
// The updated labeling from the input document, accounting for the submitted feedback.
UpdatedLabels *UpdatedLabelsIn `json:"updated_labels" validate:"required"`
}
FeedbackDataInput : Feedback data for submission.
type FeedbackDataOutput ¶
type FeedbackDataOutput struct {
// A string identifying the user adding the feedback. The only permitted value is `element_classification`.
FeedbackType *string `json:"feedback_type,omitempty"`
// Brief information about the input document.
Document *ShortDoc `json:"document,omitempty"`
// An optional string identifying the model ID. The only permitted value is `contracts`.
ModelID *string `json:"model_id,omitempty"`
// An optional string identifying the version of the model used.
ModelVersion *string `json:"model_version,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text to which the feedback applies.
Text *string `json:"text,omitempty"`
// The original labeling from the input document, without the submitted feedback.
OriginalLabels *OriginalLabelsOut `json:"original_labels,omitempty"`
// The updated labeling from the input document, accounting for the submitted feedback.
UpdatedLabels *UpdatedLabelsOut `json:"updated_labels,omitempty"`
// Pagination details, if required by the length of the output.
Pagination *Pagination `json:"pagination,omitempty"`
}
FeedbackDataOutput : Information returned from the **Add Feedback** method.
type FeedbackDeleted ¶
type FeedbackDeleted struct {
// HTTP return code.
Status *int64 `json:"status,omitempty"`
// Status message returned from the service.
Message *string `json:"message,omitempty"`
}
FeedbackDeleted : The status and message of the deletion request.
type FeedbackList ¶
type FeedbackList struct {
// A list of all feedback for the document.
Feedback []GetFeedback `json:"feedback,omitempty"`
}
FeedbackList : The results of a successful **List Feedback** request for all feedback.
type FeedbackReturn ¶
type FeedbackReturn struct {
// The unique ID of the feedback object.
FeedbackID *string `json:"feedback_id,omitempty"`
// An optional string identifying the person submitting feedback.
UserID *string `json:"user_id,omitempty"`
// An optional comment from the person submitting the feedback.
Comment *string `json:"comment,omitempty"`
// Timestamp listing the creation time of the feedback submission.
Created *strfmt.DateTime `json:"created,omitempty"`
// Information returned from the **Add Feedback** method.
FeedbackData *FeedbackDataOutput `json:"feedback_data,omitempty"`
}
FeedbackReturn : Information about the document and the submitted feedback.
type GetBatchOptions ¶
type GetBatchOptions struct {
// The ID of the batch-processing job whose information you want to retrieve.
BatchID *string `json:"batch_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetBatchOptions : The GetBatch options.
func (*GetBatchOptions) SetBatchID ¶
func (options *GetBatchOptions) SetBatchID(batchID string) *GetBatchOptions
SetBatchID : Allow user to set BatchID
func (*GetBatchOptions) SetHeaders ¶
func (options *GetBatchOptions) SetHeaders(param map[string]string) *GetBatchOptions
SetHeaders : Allow user to set Headers
type GetFeedback ¶
type GetFeedback struct {
// A string uniquely identifying the feedback entry.
FeedbackID *string `json:"feedback_id,omitempty"`
// A timestamp identifying the creation time of the feedback entry.
Created *strfmt.DateTime `json:"created,omitempty"`
// A string containing the user's comment about the feedback entry.
Comment *string `json:"comment,omitempty"`
// Information returned from the **Add Feedback** method.
FeedbackData *FeedbackDataOutput `json:"feedback_data,omitempty"`
}
GetFeedback : The results of a successful **Get Feedback** request for a single feedback entry.
type GetFeedbackOptions ¶
type GetFeedbackOptions struct {
// A string that specifies the feedback entry to be included in the output.
FeedbackID *string `json:"feedback_id" validate:"required"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetFeedbackOptions : The GetFeedback options.
func (*GetFeedbackOptions) SetFeedbackID ¶
func (options *GetFeedbackOptions) SetFeedbackID(feedbackID string) *GetFeedbackOptions
SetFeedbackID : Allow user to set FeedbackID
func (*GetFeedbackOptions) SetHeaders ¶
func (options *GetFeedbackOptions) SetHeaders(param map[string]string) *GetFeedbackOptions
SetHeaders : Allow user to set Headers
func (*GetFeedbackOptions) SetModel ¶ added in v0.7.0
func (options *GetFeedbackOptions) SetModel(model string) *GetFeedbackOptions
SetModel : Allow user to set Model
type HTMLReturn ¶
type HTMLReturn struct {
// The number of pages in the input document.
NumPages *string `json:"num_pages,omitempty"`
// The author of the input document, if identified.
Author *string `json:"author,omitempty"`
// The publication date of the input document, if identified.
PublicationDate *string `json:"publication_date,omitempty"`
// The title of the input document, if identified.
Title *string `json:"title,omitempty"`
// The HTML version of the input document.
HTML *string `json:"html,omitempty"`
}
HTMLReturn : The HTML converted from an input document.
type Interpretation ¶ added in v0.10.0
type Interpretation struct {
// The value that was located in the normalized text.
Value *string `json:"value,omitempty"`
// An integer or float expressing the numeric value of the `value` key.
NumericValue *float64 `json:"numeric_value,omitempty"`
// 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.
Unit *string `json:"unit,omitempty"`
}
Interpretation : The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.
type Key ¶ added in v0.7.0
type Key struct {
// The unique ID of the key in the table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text content of the table cell without HTML markup.
Text *string `json:"text,omitempty"`
}
Key : A key in a key-value pair.
type KeyValuePair ¶ added in v0.7.0
type KeyValuePair struct {
// A key in a key-value pair.
Key *Key `json:"key,omitempty"`
// A list of values in a key-value pair.
Value []Value `json:"value,omitempty"`
}
KeyValuePair : Key-value pairs detected across cell boundaries.
type Label ¶
type Label struct {
// The identified `nature` of the element.
Nature *string `json:"nature" validate:"required"`
// The identified `party` of the element.
Party *string `json:"party" validate:"required"`
}
Label : 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.
type LeadingSentence ¶
type LeadingSentence struct {
// The text of the leading sentence.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// An array of `location` objects that lists the locations of detected leading sentences.
ElementLocations []ElementLocations `json:"element_locations,omitempty"`
}
LeadingSentence : The leading sentences in a section or subsection of the input document.
type ListBatchesOptions ¶
type ListBatchesOptions struct {
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListBatchesOptions : The ListBatches options.
func (*ListBatchesOptions) SetHeaders ¶
func (options *ListBatchesOptions) SetHeaders(param map[string]string) *ListBatchesOptions
SetHeaders : Allow user to set Headers
type ListFeedbackOptions ¶
type ListFeedbackOptions struct {
// An optional string that filters the output to include only feedback with the specified feedback type. The only
// permitted value is `element_classification`.
FeedbackType *string `json:"feedback_type,omitempty"`
// An optional string in the format `YYYY-MM-DD` that filters the output to include only feedback that was added before
// the specified date.
Before *strfmt.Date `json:"before,omitempty"`
// An optional string in the format `YYYY-MM-DD` that filters the output to include only feedback that was added after
// the specified date.
After *strfmt.Date `json:"after,omitempty"`
// An optional string that filters the output to include only feedback from the document with the specified
// `document_title`.
DocumentTitle *string `json:"document_title,omitempty"`
// An optional string that filters the output to include only feedback with the specified `model_id`. The only
// permitted value is `contracts`.
ModelID *string `json:"model_id,omitempty"`
// An optional string that filters the output to include only feedback with the specified `model_version`.
ModelVersion *string `json:"model_version,omitempty"`
// 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.
CategoryRemoved *string `json:"category_removed,omitempty"`
// 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.
CategoryAdded *string `json:"category_added,omitempty"`
// 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.
CategoryNotChanged *string `json:"category_not_changed,omitempty"`
// 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.
TypeRemoved *string `json:"type_removed,omitempty"`
// 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.
TypeAdded *string `json:"type_added,omitempty"`
// 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.
TypeNotChanged *string `json:"type_not_changed,omitempty"`
// An optional integer specifying the number of documents that you want the service to return.
PageLimit *int64 `json:"page_limit,omitempty"`
// An optional string that returns the set of documents after the previous set. Use this parameter with the
// `page_limit` parameter.
Cursor *string `json:"cursor,omitempty"`
// 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`.
Sort *string `json:"sort,omitempty"`
// 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.
IncludeTotal *bool `json:"include_total,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListFeedbackOptions : The ListFeedback options.
func (*ListFeedbackOptions) SetAfter ¶
func (options *ListFeedbackOptions) SetAfter(after *strfmt.Date) *ListFeedbackOptions
SetAfter : Allow user to set After
func (*ListFeedbackOptions) SetBefore ¶
func (options *ListFeedbackOptions) SetBefore(before *strfmt.Date) *ListFeedbackOptions
SetBefore : Allow user to set Before
func (*ListFeedbackOptions) SetCategoryAdded ¶
func (options *ListFeedbackOptions) SetCategoryAdded(categoryAdded string) *ListFeedbackOptions
SetCategoryAdded : Allow user to set CategoryAdded
func (*ListFeedbackOptions) SetCategoryNotChanged ¶
func (options *ListFeedbackOptions) SetCategoryNotChanged(categoryNotChanged string) *ListFeedbackOptions
SetCategoryNotChanged : Allow user to set CategoryNotChanged
func (*ListFeedbackOptions) SetCategoryRemoved ¶
func (options *ListFeedbackOptions) SetCategoryRemoved(categoryRemoved string) *ListFeedbackOptions
SetCategoryRemoved : Allow user to set CategoryRemoved
func (*ListFeedbackOptions) SetCursor ¶
func (options *ListFeedbackOptions) SetCursor(cursor string) *ListFeedbackOptions
SetCursor : Allow user to set Cursor
func (*ListFeedbackOptions) SetDocumentTitle ¶
func (options *ListFeedbackOptions) SetDocumentTitle(documentTitle string) *ListFeedbackOptions
SetDocumentTitle : Allow user to set DocumentTitle
func (*ListFeedbackOptions) SetFeedbackType ¶
func (options *ListFeedbackOptions) SetFeedbackType(feedbackType string) *ListFeedbackOptions
SetFeedbackType : Allow user to set FeedbackType
func (*ListFeedbackOptions) SetHeaders ¶
func (options *ListFeedbackOptions) SetHeaders(param map[string]string) *ListFeedbackOptions
SetHeaders : Allow user to set Headers
func (*ListFeedbackOptions) SetIncludeTotal ¶
func (options *ListFeedbackOptions) SetIncludeTotal(includeTotal bool) *ListFeedbackOptions
SetIncludeTotal : Allow user to set IncludeTotal
func (*ListFeedbackOptions) SetModelID ¶
func (options *ListFeedbackOptions) SetModelID(modelID string) *ListFeedbackOptions
SetModelID : Allow user to set ModelID
func (*ListFeedbackOptions) SetModelVersion ¶
func (options *ListFeedbackOptions) SetModelVersion(modelVersion string) *ListFeedbackOptions
SetModelVersion : Allow user to set ModelVersion
func (*ListFeedbackOptions) SetPageLimit ¶
func (options *ListFeedbackOptions) SetPageLimit(pageLimit int64) *ListFeedbackOptions
SetPageLimit : Allow user to set PageLimit
func (*ListFeedbackOptions) SetSort ¶
func (options *ListFeedbackOptions) SetSort(sort string) *ListFeedbackOptions
SetSort : Allow user to set Sort
func (*ListFeedbackOptions) SetTypeAdded ¶
func (options *ListFeedbackOptions) SetTypeAdded(typeAdded string) *ListFeedbackOptions
SetTypeAdded : Allow user to set TypeAdded
func (*ListFeedbackOptions) SetTypeNotChanged ¶
func (options *ListFeedbackOptions) SetTypeNotChanged(typeNotChanged string) *ListFeedbackOptions
SetTypeNotChanged : Allow user to set TypeNotChanged
func (*ListFeedbackOptions) SetTypeRemoved ¶
func (options *ListFeedbackOptions) SetTypeRemoved(typeRemoved string) *ListFeedbackOptions
SetTypeRemoved : Allow user to set TypeRemoved
type Location ¶
type Location struct {
// The element's `begin` index.
Begin *int64 `json:"begin" validate:"required"`
// The element's `end` index.
End *int64 `json:"end" validate:"required"`
}
Location : The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`.
type Mention ¶ added in v0.10.0
type Mention struct {
// The name of the party.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
Mention : A mention of a party.
type OriginalLabelsIn ¶
type OriginalLabelsIn struct {
// Description of the action specified by the element and whom it affects.
Types []TypeLabel `json:"types" validate:"required"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []Category `json:"categories" validate:"required"`
}
OriginalLabelsIn : The original labeling from the input document, without the submitted feedback.
type OriginalLabelsOut ¶
type OriginalLabelsOut struct {
// Description of the action specified by the element and whom it affects.
Types []TypeLabel `json:"types,omitempty"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []Category `json:"categories,omitempty"`
// A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible values are
// `added`, `not_changed`, and `removed`.
Modification *string `json:"modification,omitempty"`
}
OriginalLabelsOut : The original labeling from the input document, without the submitted feedback.
type Pagination ¶
type Pagination struct {
// A token identifying the current page of results.
RefreshCursor *string `json:"refresh_cursor,omitempty"`
// A token identifying the next page of results.
NextCursor *string `json:"next_cursor,omitempty"`
// The URL that returns the current page of results.
RefreshURL *string `json:"refresh_url,omitempty"`
// The URL that returns the next page of results.
NextURL *string `json:"next_url,omitempty"`
// Reserved for future use.
Total *int64 `json:"total,omitempty"`
}
Pagination : Pagination details, if required by the length of the output.
type Paragraphs ¶ added in v0.10.0
type Paragraphs struct {
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
Paragraphs : The locations of each paragraph in the input document.
type Parties ¶
type Parties struct {
// The normalized form of the party's name.
Party *string `json:"party,omitempty"`
// A string identifying the party's role.
Role *string `json:"role,omitempty"`
// A string that identifies the importance of the party.
Importance *string `json:"importance,omitempty"`
// A list of the party's address or addresses.
Addresses []Address `json:"addresses,omitempty"`
// A list of the names and roles of contacts identified in the input document.
Contacts []Contact `json:"contacts,omitempty"`
// A list of the party's mentions in the input document.
Mentions []Mention `json:"mentions,omitempty"`
}
Parties : A party and its corresponding role, including address and contact information if identified.
type PaymentTerms ¶ added in v0.10.0
type PaymentTerms struct {
// The confidence level in the identification of the payment term.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The payment term (duration).
Text *string `json:"text,omitempty"`
// 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.
TextNormalized *string `json:"text_normalized,omitempty"`
// The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text
// exists.
Interpretation *Interpretation `json:"interpretation,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
PaymentTerms : The document's payment duration or durations.
type RowHeaders ¶
type RowHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// If you provide customization input, the normalized version of the cell text according to the customization;
// otherwise, the same value as `text`.
TextNormalized *string `json:"text_normalized,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
RowHeaders : Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table.
type SectionTitle ¶
type SectionTitle struct {
// The text of the section title, if identified.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
SectionTitle : The table's section title, if identified.
type SectionTitles ¶
type SectionTitles struct {
// The text of the section title, if identified.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// 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.
Level *int64 `json:"level,omitempty"`
// An array of `location` objects that lists the locations of detected section titles.
ElementLocations []ElementLocations `json:"element_locations,omitempty"`
}
SectionTitles : 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.
type ShortDoc ¶
type ShortDoc struct {
// The title of the input document, if identified.
Title *string `json:"title,omitempty"`
// The MD5 hash of the input document.
Hash *string `json:"hash,omitempty"`
}
ShortDoc : Brief information about the input document.
type TableHeaders ¶
type TableHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The location of the table header cell in the current table as defined by its `begin` and `end` offsets,
// respectfully, in the input document.
Location interface{} `json:"location,omitempty"`
// The textual contents of the cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
TableHeaders : The contents of the current table's header.
type TableReturn ¶
type TableReturn struct {
// Information about the parsed input document.
Document *DocInfo `json:"document,omitempty"`
// The ID of the model used to extract the table contents. The value for table extraction is `tables`.
ModelID *string `json:"model_id,omitempty"`
// The version of the `tables` model ID.
ModelVersion *string `json:"model_version,omitempty"`
// Definitions of the tables identified in the input document.
Tables []Tables `json:"tables,omitempty"`
}
TableReturn : The analysis of the document's tables.
type TableTitle ¶ added in v0.10.0
type TableTitle struct {
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text of the identified table title or caption.
Text *string `json:"text,omitempty"`
}
TableTitle : 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.
type Tables ¶
type Tables struct {
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The textual contents of the current table from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// The table's section title, if identified.
SectionTitle *SectionTitle `json:"section_title,omitempty"`
// 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.
Title *TableTitle `json:"title,omitempty"`
// An array of table-level cells that apply as headers to all the other cells in the current table.
TableHeaders []TableHeaders `json:"table_headers,omitempty"`
// An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the current
// table.
RowHeaders []RowHeaders `json:"row_headers,omitempty"`
// An array of column-level cells, each applicable as a header to other cells in the same column as itself, of the
// current table.
ColumnHeaders []ColumnHeaders `json:"column_headers,omitempty"`
// 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.
BodyCells []BodyCells `json:"body_cells,omitempty"`
// An array of objects that list text that is related to the table contents and that precedes or follows the current
// table.
Contexts []Contexts `json:"contexts,omitempty"`
// An array of key-value pairs identified in the current table.
KeyValuePairs []KeyValuePair `json:"key_value_pairs,omitempty"`
}
Tables : The contents of the tables extracted from a document.
type TerminationDates ¶
type TerminationDates struct {
// The confidence level in the identification of the termination date.
ConfidenceLevel *string `json:"confidence_level,omitempty"`
// The termination date.
Text *string `json:"text,omitempty"`
// 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.
TextNormalized *string `json:"text_normalized,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
}
TerminationDates : Termination dates identified in the input document.
type TypeLabel ¶
type TypeLabel struct {
// 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.
Label *Label `json:"label,omitempty"`
// Hashed values that you can send to IBM to provide feedback or receive support.
ProvenanceIds []string `json:"provenance_ids,omitempty"`
}
TypeLabel : Identification of a specific type.
type TypeLabelComparison ¶ added in v0.7.0
type TypeLabelComparison struct {
// 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.
Label *Label `json:"label,omitempty"`
}
TypeLabelComparison : Identification of a specific type.
type UnalignedElement ¶
type UnalignedElement struct {
// 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.
DocumentLabel *string `json:"document_label,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text of the element.
Text *string `json:"text,omitempty"`
// Description of the action specified by the element and whom it affects.
Types []TypeLabelComparison `json:"types,omitempty"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []CategoryComparison `json:"categories,omitempty"`
// List of document attributes.
Attributes []Attribute `json:"attributes,omitempty"`
}
UnalignedElement : Element that does not align semantically between two compared documents.
type UpdateBatchOptions ¶
type UpdateBatchOptions struct {
// The ID of the batch-processing job you want to update.
BatchID *string `json:"batch_id" validate:"required"`
// The action you want to perform on the specified batch-processing job.
Action *string `json:"action" validate:"required"`
// 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.
Model *string `json:"model,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateBatchOptions : The UpdateBatch options.
func (*UpdateBatchOptions) SetAction ¶
func (options *UpdateBatchOptions) SetAction(action string) *UpdateBatchOptions
SetAction : Allow user to set Action
func (*UpdateBatchOptions) SetBatchID ¶
func (options *UpdateBatchOptions) SetBatchID(batchID string) *UpdateBatchOptions
SetBatchID : Allow user to set BatchID
func (*UpdateBatchOptions) SetHeaders ¶
func (options *UpdateBatchOptions) SetHeaders(param map[string]string) *UpdateBatchOptions
SetHeaders : Allow user to set Headers
func (*UpdateBatchOptions) SetModel ¶ added in v0.7.0
func (options *UpdateBatchOptions) SetModel(model string) *UpdateBatchOptions
SetModel : Allow user to set Model
type UpdatedLabelsIn ¶
type UpdatedLabelsIn struct {
// Description of the action specified by the element and whom it affects.
Types []TypeLabel `json:"types" validate:"required"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []Category `json:"categories" validate:"required"`
}
UpdatedLabelsIn : The updated labeling from the input document, accounting for the submitted feedback.
type UpdatedLabelsOut ¶
type UpdatedLabelsOut struct {
// Description of the action specified by the element and whom it affects.
Types []TypeLabel `json:"types,omitempty"`
// List of functional categories into which the element falls; in other words, the subject matter of the element.
Categories []Category `json:"categories,omitempty"`
// The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`,
// `not_changed`, and `removed`.
Modification *string `json:"modification,omitempty"`
}
UpdatedLabelsOut : The updated labeling from the input document, accounting for the submitted feedback.
type Value ¶ added in v0.7.0
type Value struct {
// The unique ID of the value in the table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *Location `json:"location,omitempty"`
// The text content of the table cell without HTML markup.
Text *string `json:"text,omitempty"`
}
Value : A value in a key-value pair.