Extract equations and tables from academic PDFs with OCR
Nougat OCR loader parses academic PDFs to extract equations, symbols, and tables with LaTeX math support for LlamaIndex document ingestion.
Why it matters
Parse academic PDF documents to extract mathematical equations, symbols, and tables in a structured format that preserves LaTeX notation and tabular data for downstream processing and indexing.
Outcomes
What it gets done
Read PDF files containing academic papers and technical documents
Recognize and extract LaTeX mathematical equations and symbols
Parse and preserve table structures from PDF documents
Output structured markdown files with extracted content
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-reader-readers-nougat-ocr | bash Overview
Nougat OCR loader
Nougat OCR loader is a LlamaIndex reader that parses academic PDF documents to extract equations, mathematical symbols, and tables. It understands LaTeX math notation and table structures. The loader automatically creates an output folder containing the parsed content in `.mmd` format. Use this loader when you need to process academic PDFs containing mathematical equations, symbols, and tables. It understands LaTeX math and table structures, making it suitable for documents with mathematical notation.
What it does
Nougat OCR loader is a PDF reader for LlamaIndex that extracts mathematical equations, symbols, and tables from academic PDF documents. It understands LaTeX math notation and table structures. The loader outputs parsed content as .mmd files in an automatically created output folder.
When to use - and when NOT to
Use Nougat OCR loader when you need to parse academic papers or PDFs containing mathematical notation, equations, or tables. The source material indicates it reads equations, symbols, and tables from academic PDF documents and understands LaTeX math and tables.
Consider other PDF readers for documents without mathematical notation or complex tables.
Inputs and outputs
You provide the file path to a PDF document. An output folder is automatically created with the same name as the input PDF, containing a .mmd file with the parsed results.
Installation and usage
Install the loader via pip:
pip install llama-index-readers-nougat-ocr
Basic usage example:
from llama_index.readers.nougat_ocr import PDFNougatOCR
reader = PDFNougatOCR()
pdf_path = Path("/path/to/pdf")
documents = reader.load_data(pdf_path)
Who it's for
This loader is for anyone working with academic PDFs containing equations, symbols, and tables who needs to integrate them into LlamaIndex pipelines. It is useful when working with documents where LaTeX math and table understanding is needed.
Source README
Nougat OCR loader
pip install llama-index-readers-nougat-ocr
This loader reads the equations, symbols, and tables included in the PDF.
Users can input the path of the academic PDF document file which they want to parse. This OCR understands LaTeX math and tables.
Usage
Here's an example usage of the PDFNougatOCR.
from llama_index.readers.nougat_ocr import PDFNougatOCR
reader = PDFNougatOCR()
pdf_path = Path("/path/to/pdf")
documents = reader.load_data(pdf_path)
Miscellaneous
An output folder will be created with the same name as the pdf and .mmd extension.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.