Surya document OCR tool for small business
How small businesses use Surya for document text extraction and layout analysis, and how MILabs sets it up.
Updated 2026-04-23
What Surya is
Surya is an open source toolkit from Datalab for reading documents. Its main functions cover text detection and optical character recognition, which turns the text in scanned pages and images into machine readable text. It also analyses page layout, so headings, paragraphs, tables and figures can be told apart, and it works out a reading order for them. Because the code is published on GitHub, a business can run it on its own servers or on a machine it controls instead of sending files to a hosted service. Surya is a component rather than a finished application. It produces text and structure from documents, and another system such as a search index, a spreadsheet export or an assistant uses that output. Teams with paper or PDF records often adopt it as a first step, since the extracted text can feed search, question answering or filing. Its results work best as drafts that people review.
Surya in plain language
Optical character recognition turns a picture of text into text a computer can search, copy and count. A photographed receipt or scanned letter holds words only as pixels. Software must locate the lines, decide which marks are letters and then work out the words those letters form. Surya handles that chain for scanned pages and images, and its layout step tells a heading from a footnote and a table cell from a paragraph.
Reading order matters more than many owners expect. A two-column page read straight across produces sentences that make no sense, and a table read left to right can scramble the columns that give each number its meaning. Surya estimates the sequence in which parts of a page should be read, so the output follows the way a person would read the document.
Because the tool produces text and positions, something else decides what that text is used for. For a small business, the useful questions are which documents are worth reading, how often they arrive and who will look at the results.
What businesses use it for
- Converting scanned invoices and receipts into text for bookkeeping
- Making archived contracts and letters searchable by content
- Lifting tables and headings from reports into a spreadsheet
- Supplying document text to a staff question answering assistant
- Reviewing the layout of forms before they are filed or shared
Who it suits
- Businesses handling large volumes of scanned forms or PDFs
- Owners who want document text to stay on machines they control
- Teams with an in-house person who can review extracted text
How MILabs sets it up
MILabs starts with a conversation about the documents the business handles, where they live now and who needs the output. We agree with the owner which documents Surya will read, where it will run and who can see the results. We then connect it to the systems already in use, such as a shared drive, an accounts package or a document store, and set permissions so each person sees only what their role needs. Access to the server and any stored text is limited to named people. Before handover we agree who looks after updates and handles problems when a scan fails, and we record that with the owner. The hosting arrangement is decided together, and work begins only once both sides agree the scope.
Builds it fits
Industries it fits
Surya in practice
A typical start is a sample rather than a full archive. Someone gathers a few dozen representative pages, such as supplier invoices from different vendors, a set of signed forms and a handful of long reports, and runs them through Surya to see where the text comes out clean. That sample shows which document types need preprocessing, such as straightening a skewed scan or raising contrast.
The next stage is usually a short pipeline rather than a single tool. Extracted text is matched against the fields the business cares about, such as a supplier name, a date or a total, and anything that does not match is routed to a person. The routing rule matters as much as the extraction. An unreadable stamp on an invoice should land in a queue with the original image attached, rather than being dropped or guessed into a ledger.
Once running, the work settles into a routine. One person looks after the server and updates, another reviews flagged pages, and the owner reads a summary of how many documents failed and why. Documents that fail repeatedly from one source often point to a scanner setting or a template that needs changing at the source, which can be a cheaper fix than adjusting the software.
Frequently asked questions
- What does Surya not do?
- Surya reads documents and reports the text and layout it finds. It understands no meaning, decides nothing about whether an invoice is correct, and answers no questions by itself. Storing, indexing and searching documents falls to other software that takes Surya's output. MILabs builds that surrounding part when a business needs it, routing results to the people who act on them.
- Is Surya suitable for a small business?
- Yes, when the business has a clear reason to read its documents and someone ready to review the output. A small business with a steady flow of scanned invoices, forms or contracts is the most common fit. Running Surya needs a machine the business controls or rents, so weigh its cost and upkeep against the time saved. MILabs can talk through whether the volume justifies it before any work begins.
- Is Surya safe to use with customer data?
- Yes. Surya can run on servers the business controls, so documents stay in that environment while they are read. Who can reach the machine, how stored text is protected and how long copies are kept all shape the result. MILabs sets permissions and agrees retention with the owner from the start. Clear decisions from the owner matter as much as the tool itself.
- What are the limits of Surya?
- Output quality depends on the scan. Blurred, skewed, handwritten or heavily stamped pages give less reliable text, and tables or unusual layouts can come out in the wrong order. Older machines may run Surya slowly, which shows up in large batches. Results work best as a starting point that a person reviews, especially any figure used for a payment, a filing or a legal decision.
- Who looks after Surya after setup?
- The business does, with support from MILabs if agreed. During setup we record who owns the server, who applies updates to Surya and its dependencies, and who reviews output when a document fails to read. That person is named in the handover notes. If the owner prefers MILabs to keep watch on updates and problems, that arrangement is set out in writing with its own scope.
