OCR job resource

class datarobot.models.ocr_job_resource.OCRJobResource(id, input_catalog_id, output_catalog_id, user_id, job_started, language)

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.

Attributes:
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:
OCRJobResource

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:
List[OCRJobResource]

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:
OCRJobResource

The created OCR job resource.

Return type:

OCRJobResource

start_job()

Start an OCR job with this OCR job resource.

Returns:
StartOCRJobResponse

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:
OCRJobStatusEnum

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

Returns:
None
Return type:

None

class datarobot.models.ocr_job_resource.OCRJobDatasetLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Supported OCR language

class datarobot.models.ocr_job_resource.OCRJobStatusEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

OCR Job status enum

class datarobot.models.ocr_job_resource.StartOCRJobResponse(job_status_location, output_location, error_report_location)

Container of Start OCR Job API response