Docs

DocsRecordsDocuments and files

Scans, photos and other languages

How Leaglety reads a PDF text layer, a scan, a Word file and a photo, and what it does when the text is not English.

ConceptWho can do this:Desk AdminDesk CounselParalegalCompany AdminCompany Counsel

Leaglety reads each page by the best method it has: the text already inside a PDF or a Word file, English character recognition for a scan or a photo, and, when Sarvam is set up, any language Sarvam knows. The text it reads is what the facts, the answer and Leaglety AI use; the original file is kept beside it.

What each kind of file gets#

FileHow it is read
A PDF with a text layerThe text and every word's position are read directly.
A scanned PDF pageThe page is drawn and read as an image. A page with fewer than 20 letters counts as a scan.
A photo (JPG or PNG)The picture is read as an image.
A Word file (.docx)Its headings, paragraphs, lists and tables are read, and it keeps a clean document view.

A file may be up to 25 MB. The upload accepts a PDF, a Word file (.docx), a JPG or a PNG. Any other kind is refused: "This kind of file cannot be read. Use a PDF, a Word file (.docx), or a JPG or PNG photo."

Scans and photos#

A scan is read in English. Each page keeps the text that was found, and the confidence of the read. A page read with low confidence is tagged Scanned, check it in the document pane.

  • At most 40 scanned pages in one file are read. A later scanned page reads Past the 40-page limit, not read.
  • A page with no text reads Blank page.
  • A page whose letters are mostly not Latin script is not read in English: Not in English, not read.
  • A picture that cannot be opened stops the read: "This picture could not be opened. It may be damaged."

After a file is uploaded, the summary under it says what happened, for example "12 pages read · 2 scanned, check them · 1 not in English, not read". A hard-to-read photo says "Photo is hard to read, check it".

Other languages#

When Sarvam is set up, a scan and every photo are read by Sarvam Document AI in the languages it knows, ten pages to a job. A batch that fails or comes back blank falls back to English reading, page by page. The page still opens; it is read by the other reader.

A reading that is not English is translated to English, 2,000 characters at a time, keeping paragraph breaks. The English text becomes the text every later step uses. The document pane then offers English and Original, with the note "Translated to English." or "The file as read, before translation."

What is recorded#

The reading keeps the text as it was read, the English text when it was translated, the language of the original, and who read each page (the text layer, Word, the English reader or Sarvam). The document page and the split view read that record; they do not read the file again each time they open.