A local AI-powered document summarizer that extracts text from PDF files using OCR, cleans the extracted text, and generates structured summaries with a local Large Language Model (Ollama + Qwen2.5).
- 📄 Read PDF files
- 🔍 OCR support (Tesseract)
- 🧹 Clean noisy OCR text
- 🤖 Local AI summarization (Ollama)
- 🌍 Persian language support
- 💾 Save extracted text
- 📝 Save AI-generated summaries
- 🔒 Runs completely offline
ai-document-summarizer
│
├── assets
│ ├── architecture.png
│ └── screenshots
│ ├── vscode.png
│ ├── terminal.png
│ └── summary.png
│
├── data
│ ├── input
│ └── output
│
├── docs
│
├── src
│ ├── cleaner.py
│ ├── ocr.py
│ ├── pdf_reader.py
│ ├── summarizer.py
│ └── utils.py
│
├── tests
│
├── app.py
├── requirements.txt
├── README.md
├── LICENSE
├── .gitignore
└── .env.example
Clone the repository
git clone https://github.com/YOUR_USERNAME/ai-document-summarizer.gitGo to project
cd ai-document-summarizerCreate virtual environment
python -m venv .venvActivate
macOS / Linux
source .venv/bin/activateWindows
.venv\Scripts\activateInstall requirements
pip install -r requirements.txtRun the application
python app.pyOutput files will be generated in
data/output/
- normal_text.txt
- ocr_text.txt
- clean_text.txt
- summary.txt
- Python
- pdfplumber
- pytesseract
- Pillow
- Ollama
- Qwen2.5
- Regex
- pathlib
- ✅ PDF Reader
- ✅ OCR
- ✅ Persian OCR
- ✅ Text Cleaner
- ✅ Local AI Summarizer
- ⏳ Telegram Bot
- ⏳ FastAPI
- ⏳ Docker
- ⏳ Web Interface
- ⏳ Multi-language Support
This project is licensed under the MIT License.



