Knowledge Translation Transmutation Core - Transforming translations into gold-standard quality
Project description
English · Русский · 中文 · हिन्दी · فارسی
KTTC - Knowledge Translation Transmutation Core
Autonomous AI-powered translation quality assurance
KTTC uses specialized multi-agent systems to automatically detect, analyze, and fix translation quality issues following the industry-standard MQM (Multidimensional Quality Metrics) framework. Get production-ready translation quality in seconds, not hours.
Key Features
- Multi-Agent QA System - 5 specialized agents analyze accuracy, fluency, terminology, hallucinations, and context
- MQM Scoring - Industry-standard quality metrics used in WMT benchmarks
- Smart Routing - Automatically selects optimal models based on text complexity (60% cost savings)
- Auto-Correction - LLM-powered error fixing with iterative refinement (TEaR loop)
- Language-Specific Agents - Native-level checks for English, Chinese, Russian, Hindi, and Persian
- Self-Check / Proofreading - Grammar, spelling, punctuation checking using school curriculum rules
- Translation Memory - Semantic search with quality tracking and reuse
- Glossary Management - Custom terminology + school curriculum glossaries (FGOS, UK GPS, NCERT, PEP)
- Batch Processing - Process thousands of translations in parallel
- CI/CD Ready - GitHub Actions integration, exit codes, multiple output formats
- Multi-LLM Support - OpenAI, Anthropic, GigaChat, YandexGPT
Performance: 90% cost reduction vs manual review • 100-1000x faster • 95+ MQM quality target
Try KTTC Online
Experience KTTC without installation:
- Google Colab - Interactive tutorial with examples (5 min, no setup)
- Streamlit Demo - Web UI to test your own translations (no code required)
- GitHub Codespaces - Full dev environment in browser (for contributors)
Quick Start
1. Install
pip install kttc
Optional language enhancements:
pip install kttc[english] # English: LanguageTool (5,000+ grammar rules)
pip install kttc[chinese] # Chinese: HanLP (measure words, particles)
pip install kttc[hindi] # Hindi: Indic NLP + Stanza + Spello
pip install kttc[persian] # Persian: DadmaTools (spaCy-based)
pip install kttc[all-languages] # All language helpers
2. Set API Key
export KTTC_OPENAI_API_KEY="sk-..."
# or
export KTTC_ANTHROPIC_API_KEY="sk-ant-..."
3. Check Translation Quality
kttc check source.txt translation.txt --source-lang en --target-lang es
Output:
✅ MQM Score: 96.5 (PASS - Excellent Quality)
📊 5 agents analyzed translation
⚠️ Found 2 minor issues, 0 major, 0 critical
✓ Quality threshold met (≥95.0)
That's it! KTTC works out of the box with smart defaults:
- ✅ Smart routing (auto-selects cheaper models for simple texts)
- ✅ Auto-glossary (uses 'base' glossary if exists)
- ✅ Auto-format (detects output format from file extension)
Commands
KTTC provides a unified CLI with smart auto-detection:
kttc check source.txt translation.txt # Single quality check
kttc check source.txt t1.txt t2.txt t3.txt # Auto-compares multiple translations
kttc check translations.csv # Auto-detects batch mode (CSV/JSON)
kttc check source_dir/ trans_dir/ # Auto-detects directory batch mode
kttc batch --file translations.csv # Explicit batch processing
kttc compare --source src.txt -t t1 -t t2 # Compare translations side-by-side
kttc translate --text "Hello" --source-lang en --target-lang es # Translate with QA
kttc benchmark --source text.txt --providers openai,anthropic # Benchmark LLMs
# Glossary management (project + user global storage)
kttc glossary list # List all glossaries
kttc glossary create tech --from-csv terms.csv # Create project glossary
kttc glossary create personal --from-csv my.csv --user # Create user glossary
# 🥚 Self-check / Proofreading (new!)
kttc check article.md --self --lang ru # Proofread without translation
kttc proofread article.md --lang ru # Same as above (alias)
kttc lint article.md --lang ru --fix # Quick rule-based check (no LLM)
See full command reference: docs/en/reference/cli-commands.md
Python API
import asyncio
from kttc.agents import AgentOrchestrator
from kttc.llm import OpenAIProvider
from kttc.core import TranslationTask
async def check_quality():
llm = OpenAIProvider(api_key="your-key")
orchestrator = AgentOrchestrator(llm)
task = TranslationTask(
source_text="Hello, world!",
translation="¡Hola, mundo!",
source_lang="en",
target_lang="es",
)
report = await orchestrator.evaluate(task)
print(f"MQM Score: {report.mqm_score}")
print(f"Status: {report.status}")
asyncio.run(check_quality())
See full API reference: docs/en/reference/api-reference.md
Documentation
📚 Complete documentation is available in docs/
Quick Links
- Quickstart Guide - Get started in 5 minutes
- Installation Guide - Detailed setup instructions
- CLI Reference - All commands and options
- Architecture - How KTTC works
- Language Features - English/Chinese/Russian specialization
Documentation Structure
Following the Diátaxis framework:
- 📚 Tutorials - Learn by doing (step-by-step guides)
- 📖 Guides - Solve specific problems (how-to guides)
- 📋 Reference - Look up technical details (API, CLI)
- 💡 Explanation - Understand concepts (architecture, design)
Translations
Languages: 🇺🇸 English (primary) · 🇷🇺 Русский · 🇨🇳 中文 · 🇮🇳 हिन्दी · 🇮🇷 فارسی
Full documentation available in:
- 🇺🇸 English - Complete (primary source)
- 🇷🇺 Русский - Complete
- 🇨🇳 中文 - Complete
- 🇮🇳 हिन्दी - Complete
- 🇮🇷 فارسی - Complete
Development
Setup
git clone https://github.com/kttc-ai/kttc.git
cd kttc
python3.11 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
pre-commit install
Quality Standards
- Type Checking: mypy --strict
- Formatting: black (line length: 100)
- Linting: ruff
- Testing: pytest with asyncio support
# Run all checks
pre-commit run --all-files
pytest --cov=kttc
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick start:
- Fork the repository
- Create a feature branch
- Make changes and add tests
- Run quality checks:
pre-commit run --all-files && pytest - Submit a pull request
Please read our Code of Conduct before contributing.
Security
For security vulnerabilities, see SECURITY.md. Do not open public issues for security concerns.
License
Licensed under the Apache License 2.0. See LICENSE for details.
Copyright 2025 KTTC AI (https://github.com/kttc-ai)
Citation
If you use KTTC in your research:
@software{kttc2025,
title = {KTTC: Knowledge Translation Transmutation Core},
author = {KTTC AI},
year = {2025},
url = {https://github.com/kttc-ai/kttc},
version = {0.1.0}
}
Links
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kttc-0.4.1.tar.gz.
File metadata
- Download URL: kttc-0.4.1.tar.gz
- Upload date:
- Size: 263.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db8adabfce9935949c3c44435c59a50c536165a6e49b2fc7cd79515caff5271b
|
|
| MD5 |
9c28b7356366e289496191ef1269aae5
|
|
| BLAKE2b-256 |
124b7d79fa3c3e6fd853040dd4d731d5592fd0b48e315fd4214a59a170587afb
|
Provenance
The following attestation bundles were made for kttc-0.4.1.tar.gz:
Publisher:
publish.yml on kttc-ai/kttc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kttc-0.4.1.tar.gz -
Subject digest:
db8adabfce9935949c3c44435c59a50c536165a6e49b2fc7cd79515caff5271b - Sigstore transparency entry: 719584131
- Sigstore integration time:
-
Permalink:
kttc-ai/kttc@348d143a4f4b3702585f41b3ee05708d43267a13 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/kttc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@348d143a4f4b3702585f41b3ee05708d43267a13 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kttc-0.4.1-py3-none-any.whl.
File metadata
- Download URL: kttc-0.4.1-py3-none-any.whl
- Upload date:
- Size: 359.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ebfc30c79a97f6d8748d2fb352661231ca6db8672d074f65d1010c2918e0c7
|
|
| MD5 |
fe28be69058d50081114404e0a801c3b
|
|
| BLAKE2b-256 |
8462c72982b0a1b8a8f3e0b9c132c017410ea5233e121b8ace7ae1be683ca13e
|
Provenance
The following attestation bundles were made for kttc-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on kttc-ai/kttc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kttc-0.4.1-py3-none-any.whl -
Subject digest:
78ebfc30c79a97f6d8748d2fb352661231ca6db8672d074f65d1010c2918e0c7 - Sigstore transparency entry: 719584132
- Sigstore integration time:
-
Permalink:
kttc-ai/kttc@348d143a4f4b3702585f41b3ee05708d43267a13 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/kttc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@348d143a4f4b3702585f41b3ee05708d43267a13 -
Trigger Event:
release
-
Statement type: