Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Document Summarizer

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).


✨ Features

  • 📄 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

🏗️ Architecture

Architecture Diagram


📸 Screenshots

VS Code Project Structure

VS Code


Successful Execution

Terminal


Generated Summary

Summary


📂 Project Structure

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

⚙️ Installation

Clone the repository

git clone https://github.com/YOUR_USERNAME/ai-document-summarizer.git

Go to project

cd ai-document-summarizer

Create virtual environment

python -m venv .venv

Activate

macOS / Linux

source .venv/bin/activate

Windows

.venv\Scripts\activate

Install requirements

pip install -r requirements.txt

▶️ Usage

Run the application

python app.py

Output files will be generated in

data/output/
  • normal_text.txt
  • ocr_text.txt
  • clean_text.txt
  • summary.txt

🛠️ Tech Stack

  • Python
  • pdfplumber
  • pytesseract
  • Pillow
  • Ollama
  • Qwen2.5
  • Regex
  • pathlib

🚀 Roadmap

  • ✅ PDF Reader
  • ✅ OCR
  • ✅ Persian OCR
  • ✅ Text Cleaner
  • ✅ Local AI Summarizer
  • ⏳ Telegram Bot
  • ⏳ FastAPI
  • ⏳ Docker
  • ⏳ Web Interface
  • ⏳ Multi-language Support

📄 License

This project is licensed under the MIT License.

About

Local AI-powered PDF summarizer with OCR, text cleaning, and Ollama-based summarization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages