OCR Result
Reference documentation on processing an OCR result using the Mindee SDKs.
Accessing the Page OCR
OCRPage Attributes
OCRPage AttributesContent
Words
from mindee import OCRResponse
def handle_response(response: OCRResponse) -> None:
pages = response.inference.result.pages
for page in pages:
# Page-level properties
page_content = page.content
words = page.words
# Access the full text content extracted from this page.
print(f"Page content: {page_content}")
# Access all words detected on this page.
for word in words:
word_content = word.content
word_polygon = word.polygon
print(f"Word: {word_content}")
print(f"Polygon: {word_polygon}")handleResponse(response) {
const pages = response.inference.result.pages;
for (const page of pages) {
// Full text content extracted from this page.
const pageContent = page.content;
console.log(`Page content: ${pageContent}`);
// All words detected on this page.
for (const word of page.words) {
const wordContent = word.content;
const wordPolygon = word.polygon;
console.log(`Word: ${wordContent}`);
console.log(`Polygon: ${wordPolygon.toString()}`);
}
}
}Last updated
Was this helpful?

