424 Downloads Updated 1 month ago
Nanonets-OCR-s by Nanonets is a powerful, state-of-the-art image-to-markdown OCR model that goes far beyond traditional text extraction. It transforms documents into structured Markdown with intelligent content recognition and semantic tagging, making it ideal for downstream processing by Large Language Models (LLMs).
Automatically converts mathematical equations and formulas into properly formatted LaTeX syntax.
It distinguishes between:
- Inline equations: $...$
- Display equations: $$...$$
Describes images within documents using structured <img>
tags, making them digestible for LLM processing.
It can describe various image types, including:
- Logos
- Charts
- Graphs
It details their content, style, and context.
Identifies and isolates signatures from other text, outputting them within a <signature>
tag.
This is crucial for processing legal and business documents.
Detects and extracts watermark text from documents, placing it within a <watermark>
tag.
Converts form checkboxes and radio buttons into standardized Unicode symbols for consistent and reliable processing: - ☐ (Unchecked) - ☑ (Checked) - ☒ (Crossed)
Accurately extracts complex tables from documents and converts them into: - Markdown table format - HTML table format
To use Nanonets-OCR-s effectively, you must provide a well-structured prompt. Here’s the recommended prompt:
prompt = """Extract the text from the above document as if you were reading it naturally.
Return the tables in html format.
Return the equations in LaTeX representation.
If there is an image in the document and image caption is not present, add a small description of the image inside the <img></img> tag; otherwise, add the image caption inside <img></img>.
Watermarks should be wrapped in brackets. Ex: <watermark>OFFICIAL COPY</watermark>.
Page numbers should be wrapped in brackets. Ex: <page_number>14</page_number> or <page_number>9/22</page_number>.
Prefer using ☐ and ☑ for check boxes."""