OCR Functions
get_ocr_confidence
get_ocr_confidence(ibocr, skip_missing_confidence_scores=false)
Get OCR confidences associated with provided input Args: ibocr (IBOCRRecord): The INPUT_IBOCR_RECORD to get OCR Confidence of skip_missing_confidence_scores (bool): if true, don't raise an error if no word/char-level confidence scores are found for a particular word Returns: Returns the average confidence associated with the input. Confidence is reported as a percentage (70 means 70%) Examples: get_ocr_confidence(INPUT_IBOCR_RECORD) -> 70.2 get_ocr_confidence(INPUT_IBOCR_RECORD, skip_missing_confidence_scores=true) -> 70.2
is_ocr_required
is_ocr_required(ibocr)
Returns whether or not the record was generated using ocr. Args: ibocr (IBOCRRecord): The IBOCRRecord itself Returns: Whether the record was generated using ocr. Examples: is_ocr_required(INPUT_IBOCR_RECORD) -> True