https://github.com/kazkozdev/book-translator
📖 A blazing tool for book translations, powered by local LLM. Translates your books and documents with impressive quality using a unique two-stage approach.
https://github.com/kazkozdev/book-translator
google-translate google-translate-api llm ollama-api translation translation-service translations
Last synced: over 1 year ago
JSON representation
📖 A blazing tool for book translations, powered by local LLM. Translates your books and documents with impressive quality using a unique two-stage approach.
- Host: GitHub
- URL: https://github.com/kazkozdev/book-translator
- Owner: KazKozDev
- License: mit
- Created: 2024-12-03T15:32:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-29T19:50:23.000Z (over 1 year ago)
- Last Synced: 2025-04-23T00:13:02.564Z (over 1 year ago)
- Topics: google-translate, google-translate-api, llm, ollama-api, translation, translation-service, translations
- Language: HTML
- Homepage:
- Size: 524 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Book Translator
A platform for translating books and large text documents.
Two-step process. For better quality.
The tool processes text files using Google Translate and Ollama LLM models. It combines primary machine translation with literary refinement for better results. Suitable for translators, publishers, authors, researchers and content creators who need to translate large text documents.
Support for multiple languages including English, Russian, German, French, Spanish, Italian, Chinese, and Japanese, real-time translation progress tracking for both stages, translation history and status monitoring, automatic error recovery and retry mechanisms, and real-time metrics and system monitoring.

The application uses a sophisticated two-stage translation approach:
### Stage 1: Initial Translation
- Uses Google Translate API for fast initial translation
- Handles large volumes of text efficiently
- Provides basic translation quality
- Progress tracking for initial translation stage
### Stage 2: Literary Refinement
- Uses Ollama LLM models to refine the initial translation
- Improves literary quality and natural language flow
- Maintains context and style
- Separate progress tracking for refinement stage
### Prerequisites
- Python 3.7+
- [Ollama](https://ollama.ai/) installed and running
- Node.js (for development)
### Quick Start
1. **Clone the repository**
```bash
git clone https://github.com/kazkozdev/book-translator.git
cd book-translator
```
2. **Install dependencies**
```bash
pip install -r requirements.txt
```
3. **Pull required Ollama model**
```bash
ollama pull gemma2:27b
```
4. **Start the application**
```bash
python translator.py
```
5. **Access the application**
- Open `http://localhost:5001` in your browser
### Architecture
```
book-translator/
├── translator.py # Flask backend
├── static/ # Frontend files
├── uploads/ # Temporary uploads
├── translations/ # Completed translations
├── logs/ # Application logs
├── translations.db # Main database
└── cache.db # Cache database
```
### License
MIT License - see [LICENSE](LICENSE)
---
If you like this project, please give it a star ⭐
For questions, feedback, or support, reach out to:
[Artem KK](https://www.linkedin.com/in/kazkozdev/)