OCR job resources

class datarobot.models.ocr_job_resource.OCRJobResource

An OCR job resource container. It is used to: - Get an existing OCR job resource. - List available OCR job resources. - Start an OCR job. - Check the status of a started OCR job. - Download the error report of a started OCR job.

Added in version v3.6.0b0.

Variables:
  • id (str) – The identifier of an OCR job resource.

  • input_catalog_id (str) – The identifier of an AI catalog item used as the OCR job input.

  • output_catalog_id (str) – The identifier of an AI catalog item used as the OCR job output.

  • user_id (str) – The identifier of a user.

  • job_started (bool) – Determines if a job associated with the OCRJobResource has started.

  • language (str) – String representation of OCRJobDatasetLanguage.

classmethod get(job_resource_id)

Get an OCR job resource.

Parameters:

job_resource_id (str) – identifier of OCR job resource

Returns:

returned OCR job resource

Return type:

OCRJobResource

classmethod list(offset=0, limit=10)

Get a list of OCR job resources.

Parameters:
  • offset (int) – The offset of the query.

  • limit (int) – The limit of returned OCR job resources.

Returns:

A list of OCR job resources.

Return type:

List[OCRJobResource]

classmethod create(input_catalog_id, language)

Create a new OCR job resource and return it.

Parameters:
  • input_catalog_id (str) – The identifier of an AI catalog item used as the OCR job input.

  • language (OCRJobDatasetLanguage) – The OCR job dataset language.

Returns:

The created OCR job resource.

Return type:

OCRJobResource

start_job()

Start an OCR job with this OCR job resource.

Returns:

The response of starting an OCR job.

Return type:

StartOCRJobResponse

get_job_status()

Get status of the OCR job associated with this OCR job resource.

Returns:

OCR job status enum

Return type:

OCRJobStatusEnum

download_error_report(download_file_path)

Download the error report of the OCR job associated with this OCR job resource.

Parameters:

download_file_path (Path) – path to download error report

Return type:

None

class datarobot.models.ocr_job_resource.OCRJobDatasetLanguage

Supported OCR language

class datarobot.models.ocr_job_resource.OCRJobStatusEnum

OCR Job status enum

class datarobot.models.ocr_job_resource.StartOCRJobResponse

Container of Start OCR Job API response