v1

latestOpenAPI 3.0.22026-07-17373198641.7 KB
document
v1

Create Document Field Params: - fields: uid - category: str - max 64 symbols (from pre-defined choices) - exclude_regexps: str - optional - definition_words: str - optional - include_regexps: str - optional - regexps_pre_process_lower: bool, default=False - detected_value: str - max 256 chars - extraction_hint: str - max 30 chars (from pre-defined choices) - text_part: str - max 30 chars (from pre-defined choices)

post/api/v1/document/document-field-detectors/

Request body

uidstring uuid
warning_messagestring
category'simple_config' nullable

Field detector category used for technical needs e.g. for determining which field detectors were created automatically during import process.

exclude_regexpsstring nullable

Enter regular expressions, each on a new line, for text patterns you want EXCLUDED. The Field Detector will attempt to skip any Text Unit that contains any of the patterns written here, and will move on to the next Text Unit. Avoid using “.*” and similar unlimited multipliers, as they can crash or slow ContraxSuite. Use bounded multipliers for variable length matching, like “.{0,100}” or similar. Note that Exclude regexps are checked before Definition words and Include regexps. If a Field Detector has Exclude regexps, but no Definition words or Include regexps, it will not extract any data.

definition_wordsstring nullable

Enter words or phrases, each on a new line, that must be present in the Text Unit. These words must be in the Definitions List. If ContraxSuite fails to recognize these words as definitions, then the Field Detector skips and moves to the next Text Unit. If there are Include regexps, then the Field Detector checks against those requirements. The Field Detector marks the entire Text Unit as a match. Note that the Field Detector checks for definition words after filtering using the Exclude regexps.

include_regexpsstring nullable

Enter regular expressions, each on a new line, for text patterns you want INCLUDED. The Field Detector will attempt to match each of these regular expressions within a given Text Unit. Avoid using “.*” and similar unlimited multipliers, as they can crash or slow ContraxSuite. Use bounded multipliers for variable length matching, like “.{0,100}” or similar. Note that Include regexps are checked after both Exclude regexps and Definition words.

regexps_pre_process_lowerboolean

Set 'ignore case' flag for both 'Include regexps' and 'Exclude regexps' options.

detected_valuestring nullable

The string value written here will be assigned to the field if the Field Detector positively matches a Text Unit. This is only applicable to Choice, Multichoice, and String fields, as their respective Field Detectors do not extract and display values from the source text.

extraction_hint'TAKE_FIRST' | 'TAKE_SECOND' | 'TAKE_LAST' | 'TAKE_MIN' | 'TAKE_MAX' nullable

Provide additional instruction on which specific values should be prioritized for extraction, when multiple values of the same type (e.g., Company, Person, Geography) are found within the relevant detected Text Unit.

text_part'FULL' | 'BEFORE_REGEXP' | 'AFTER_REGEXP' | 'INSIDE_REGEXP' required

Defines which part of the matched Text Unit should be passed to the extraction function. Example: In the string "2019-01-23 is the start date and 2019-01-24 is the end date," if text part = "Before matching substring" and Include regexp is "is.{0,100}start" then "2019-01-23" will be parsed correctly as the start date.

detect_limit_unit'NONE' | 'UNIT' required

Choose to add an upward limit to the amount of document text ContraxSuite will search for this Document Field. For example, you can choose to only search the first 10 paragraphs of text for the value required (this often works best for values like “Company,” “Execution Date,” or “Parties,” all of which typically appear in the first few paragraphs of a contract).

detect_limit_countinteger required

Specify the maximum range for a bounded search. Field detection begins at the top of the document and continues until this Nth "Detect limit unit" element.

fieldstring required

Example request

{
  "exclude_regexps": "exclude_regexps",
  "text_part": "FULL",
  "detect_limit_count": -1803530559,
  "definition_words": "definition_words",
  "warning_message": "warning_message",
  "uid": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "detected_value": "detected_value",
  "field": "field",
  "detect_limit_unit": "NONE",
  "include_regexps": "include_regexps",
  "category": "simple_config",
  "extraction_hint": "TAKE_FIRST",
  "regexps_pre_process_lower": true
}

Response

uidstring uuid
warning_messagestring
category'simple_config' nullable

Field detector category used for technical needs e.g. for determining which field detectors were created automatically during import process.

exclude_regexpsstring nullable

Enter regular expressions, each on a new line, for text patterns you want EXCLUDED. The Field Detector will attempt to skip any Text Unit that contains any of the patterns written here, and will move on to the next Text Unit. Avoid using “.*” and similar unlimited multipliers, as they can crash or slow ContraxSuite. Use bounded multipliers for variable length matching, like “.{0,100}” or similar. Note that Exclude regexps are checked before Definition words and Include regexps. If a Field Detector has Exclude regexps, but no Definition words or Include regexps, it will not extract any data.

definition_wordsstring nullable

Enter words or phrases, each on a new line, that must be present in the Text Unit. These words must be in the Definitions List. If ContraxSuite fails to recognize these words as definitions, then the Field Detector skips and moves to the next Text Unit. If there are Include regexps, then the Field Detector checks against those requirements. The Field Detector marks the entire Text Unit as a match. Note that the Field Detector checks for definition words after filtering using the Exclude regexps.

include_regexpsstring nullable

Enter regular expressions, each on a new line, for text patterns you want INCLUDED. The Field Detector will attempt to match each of these regular expressions within a given Text Unit. Avoid using “.*” and similar unlimited multipliers, as they can crash or slow ContraxSuite. Use bounded multipliers for variable length matching, like “.{0,100}” or similar. Note that Include regexps are checked after both Exclude regexps and Definition words.

regexps_pre_process_lowerboolean

Set 'ignore case' flag for both 'Include regexps' and 'Exclude regexps' options.

detected_valuestring nullable

The string value written here will be assigned to the field if the Field Detector positively matches a Text Unit. This is only applicable to Choice, Multichoice, and String fields, as their respective Field Detectors do not extract and display values from the source text.

extraction_hint'TAKE_FIRST' | 'TAKE_SECOND' | 'TAKE_LAST' | 'TAKE_MIN' | 'TAKE_MAX' nullable

Provide additional instruction on which specific values should be prioritized for extraction, when multiple values of the same type (e.g., Company, Person, Geography) are found within the relevant detected Text Unit.

text_part'FULL' | 'BEFORE_REGEXP' | 'AFTER_REGEXP' | 'INSIDE_REGEXP' required

Defines which part of the matched Text Unit should be passed to the extraction function. Example: In the string "2019-01-23 is the start date and 2019-01-24 is the end date," if text part = "Before matching substring" and Include regexp is "is.{0,100}start" then "2019-01-23" will be parsed correctly as the start date.

detect_limit_unit'NONE' | 'UNIT' required

Choose to add an upward limit to the amount of document text ContraxSuite will search for this Document Field. For example, you can choose to only search the first 10 paragraphs of text for the value required (this often works best for values like “Company,” “Execution Date,” or “Parties,” all of which typically appear in the first few paragraphs of a contract).

detect_limit_countinteger required

Specify the maximum range for a bounded search. Field detection begins at the top of the document and continues until this Nth "Detect limit unit" element.

fieldstring required

Example response

{
  "exclude_regexps": "exclude_regexps",
  "text_part": "FULL",
  "detect_limit_count": -1803530559,
  "definition_words": "definition_words",
  "warning_message": "warning_message",
  "uid": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "detected_value": "detected_value",
  "field": "field",
  "detect_limit_unit": "NONE",
  "include_regexps": "include_regexps",
  "category": "simple_config",
  "extraction_hint": "TAKE_FIRST",
  "regexps_pre_process_lower": true
}