Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/QuivrHQ/MegaParse
File Parser optimised for LLM Ingestion with no loss 🧠Parse PDFs, Docx, PPTx in a format that is ideal for LLMs.
https://github.com/QuivrHQ/MegaParse
docx llm parser pdf powerpoint
Last synced: 3 months ago
JSON representation
File Parser optimised for LLM Ingestion with no loss 🧠Parse PDFs, Docx, PPTx in a format that is ideal for LLMs.
- Host: GitHub
- URL: https://github.com/QuivrHQ/MegaParse
- Owner: QuivrHQ
- License: apache-2.0
- Created: 2024-05-29T08:40:29.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-20T09:54:01.000Z (4 months ago)
- Last Synced: 2024-08-20T18:34:34.329Z (4 months ago)
- Topics: docx, llm, parser, pdf, powerpoint
- Language: Python
- Homepage: https://pypi.org/project/megaparse/
- Size: 4.05 MB
- Stars: 470
- Watchers: 7
- Forks: 34
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-LLM-RAG-Application - MegaParse
- awesome-LLM-resourses - MegaParse
- AiTreasureBox - QuivrHQ/MegaParse - 12-14_4206_11](https://img.shields.io/github/stars/QuivrHQ/MegaParse.svg)|File Parser optimised for LLM Ingestion with no loss 🧠Parse PDFs, Docx, PPTx in a format that is ideal for LLMs.| (Repos)
README
# 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
```bash
pip install megaparse
```## Usage
1. Add your OpenAI API key to the .env file
2. Install poppler on your computer (images and PDFs)
3. Install tesseract on your computer (images and PDFs)
```python
from megaparse import MegaParsemegaparse = MegaParse(file_path="./test.pdf")
document = megaparse.load()
print(document.page_content)
megaparse.save_md(document.page_content, "./test.md")
```### (Optional) Use LlamaParse for Improved Results
1. Create an account on [Llama Cloud](https://cloud.llamaindex.ai/) and get your API key.
2. Call Megaparse with the `llama_parse_api_key` parameter
```python
from megaparse import MegaParsemegaparse = MegaParse(file_path="./test.pdf", llama_parse_api_key="llx-your_api_key")
document = megaparse.load()
print(document.page_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
- [X] Add Rye package manager## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=QuivrHQ/MegaParse&type=Date)](https://star-history.com/#QuivrHQ/MegaParse&Date)