Browse our Products

Latest Release

What was changed

KeySummaryCategory
OCRNET‑1155Improve region detection accuracy.Enhancement
OCRNET‑1159Keyword and numeric search: allow searching by keywords as well as numeric values.New feature
OCRNET‑1153Fix bug with resource download (add check sum for models size).Bug fix
OCRNET‑1153Add RecognizeTables method in the API (according to the customers issue)New feature

⚠️ Disclaimer:
By using AI-powered features, you are solely responsible for ensuring compliance with any
applicable laws, licensing terms, third-party AI model usage policies, and data privacy regulations.
Aspose does not take responsibility for the accuracy, licensing, or reliability of external AI models.

⚠️ Disclaimer:
The AI component is supported only in Windows.

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Python via .NET 26.1 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been introduced in this release:

aspose.ocr.AsposeOcr.recognize_tables - a new method

Detect all tables in the image, identify their structure, recognize text within each cell, and return a list of OCRTablePage objects.

New Methods

MethodDescription
aspose.ocr.AsposeOcr.recognize_tables(images, languageDetect tables and structure and recognizes text cells.

aspose.ocr.ai.KeywordsAIProcessor - a new class

Performs AI-based keyword and numeric value search in OCR-recognized text. You can set the keywords used for searching OCR-recognized text and get the JSON-formatted string with the following structure:
[ { “keyword”: “string”, “value”: “string”, “number”: “string” } ]

Updated public APIs:

The following public APIs have been updated in this release:

aspose.ocr.OcrOutput.get_table_data()

Return a list of OCRTablePage objects.

aspose.ocr.ai.AIResult

Added property ‘result’

Removed public APIs:

The following public APIs was removed:

aspose.ocr.ai.AIResult

Removed property recognition_text

Examples

The code samples below illustrate the changes introduced in this release:

Detect and Recognize tables

recognitionEngine = aspose.ocr.AsposeOcr()
# Add an image to OcrInput object
input = aspose.ocr.OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Detect all tables and recognize text in cells
results = recognitionEngine.recognize_tables(input, Language.LATIN)
# Print result
for page in results[0].tables:
    print("page:" + str(page.table_index))
    for row in page.rows:
        print("row:" + str(row.row_index))
        for cell in row.cells:
            print("cell:" + str(cell.column_index)+": "+cell.text)

Get values from image by keywords (using AI)

recognitionEngine = aspose.ocr.AsposeOcr()
# Add an image to OcrInput object
input = aspose.ocr.OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Recognize image
results = recognitionEngine.recognize(input)

# Set up AI component
ai = aspose.ocr.ai.AsposeAI()
proc = aspose.ocr.ai.KeywordsAIProcessor()

# Set up keywords list
proc.set_keywords(["Total", "Tax"])
ai.set_post_processor(proc)
ai.run_postprocessor(results)


# Print results (json)
print(proc.get_result()[0].result)

# [
#  {
#    "keyword": "Total",
#    "value": "Donald Patrick",
#    "number": "101"
#  },
#  {
#    "keyword": "Tax",
#    "value": "Samuel Samson",
#    "number": "101"
#  }
#]