Parse complex files (PDF,Docx,PPTX) for LLM consumption
Project description
MegaParse - Your Mega Parser for every type of documents
MegaParse is a powerful and versatile parser that can handle various types of documents with ease. Whether you're dealing with text, PDFs, Powerpoint presentations, Word documents MegaParse has got you covered. Focus on having no information loss during parsing.
Key Features 🎯
- Versatile Parser: MegaParse is a powerful and versatile parser that can handle various types of documents with ease.
- No Information Loss: Focus on having no information loss during parsing.
- Fast and Efficient: Designed with speed and efficiency at its core.
- Wide File Compatibility: Supports Text, PDF, Powerpoint presentations, Excel, CSV, Word documents.
- Open Source: Freedom is beautiful, and so is MegaParse. Open source and free to use.
Support
- Files: ✅ PDF ✅ Powerpoint ✅ Word
- Content: ✅ Tables ✅ TOC ✅ Headers ✅ Footers ✅ Images
Example
https://github.com/QuivrHQ/MegaParse/assets/19614572/1b4cdb73-8dc2-44ef-b8b4-a7509bc8d4f3
Installation
pip install megaparse
Usage
-
Add your OpenAI API key to the .env file
-
Install poppler on your computer (images and PDFs)
-
Install tesseract on your computer (images and PDFs)
from megaparse.Converter import MegaParse
megaparse = MegaParse(file_path="./test.pdf")
document = megaparse.load()
print(document.content)
megaparse.save_md(content, "./test.md")
(Optional) Use LlamaParse for Improved Results
-
Create an account on Llama Cloud and get your API key.
-
Call Megaparse with the
llama_parse_api_key
parameter
from megaparse.Converter import MegaParse
megaparse = MegaParse(file_path="./test.pdf", llama_parse_api_key="llx-your_api_key")
document = megaparse.load()
print(document.content)
BenchMark
Parser | Diff |
---|---|
LMM megaparse | 36 |
Megaparse with LLamaParse and GPTCleaner | 74 |
Megaparse with LLamaParse | 97 |
Unstructured Augmented Parse | 99 |
LLama Parse | 102 |
Megaparse | 105 |
Lower is better
Next Steps
- Improve Table Parsing
- Improve Image Parsing and description
- Add TOC for Docx
- Add Hyperlinks for Docx
- Order Headers for Docx to Markdown
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for megaparse-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1270a764880f8b131a8f5d6d77ccf957f68386790604f7b4ecb331f07324e2d4 |
|
MD5 | 94ea4bc557dfd759ae097e9e63da5d9c |
|
BLAKE2b-256 | 72985bd75991fefc5a043af10d0b19750c14a3c48a038b98a3d3895ef8741d5e |