Skip to main content
AI-Assisted Literary Translation Platform (AI-CAT) — cover image

AI-Assisted Literary Translation Platform (AI-CAT)

A self-hosted AI-assisted CAT platform that learns a literary translator's personal style from prior work and generates high-quality draft translations using a retrieval-augmented generation pipeline.

Client Personal / Professional Translators
Completed
RAGTranslationFastAPIReactPostgreSQLpgvectorPersian NLPSelf-Hosted

Overview

As a professional literary translator with six years and 40+ published books behind me, I kept hitting the same wall: existing CAT tools treat translation memory as a lookup table, not a style model. AI-CAT is a self-hosted platform I designed and built from scratch that ingests a translator’s previously published books, aligns them sentence by sentence into a searchable Translation Memory, and uses that memory to draft new translations that sound like the translator wrote them, not like generic machine output. It’s in daily use by me and two translator colleagues on real work.

The Problem

Off-the-shelf translation tools produce technically correct but stylistically flat output, and more importantly, they have no memory of a specific translator’s vocabulary, rhythm, or phrasing choices. For literary work, especially into a language like Persian where register and word choice carry real meaning, that flatness means every draft still needs a full rewrite rather than a review. I wanted a tool that would actually learn from a body of translated work and improve with correction, not a one-shot MT wrapper.

Architecture

The platform runs three independent, asynchronous pipelines on top of a FastAPI backend and a React frontend:

Knowledge Import Pipeline parses a translator’s previously published books, aligns source and target text sentence by sentence, extracts terminology, and builds a searchable, versioned Translation Memory.

Translation Pipeline takes a new, untranslated book and processes it sentence by sentence: retrieve the closest matching prior translations and relevant terminology, then prompt an LLM to draft a translation consistent with the translator’s established voice.

Knowledge Update Pipeline feeds human-reviewed corrections back into the Translation Memory, so the system’s understanding of the translator’s style keeps improving with use rather than staying static.

Hybrid Inference Layer connects the VPS to a home GPU machine over a private network, so self-hosted inference is free and private, with a cloud fallback available when needed. Embedding, translation, and reranking are all swappable per user, with the more resource-intensive local models reserved for admin accounts.

Persian-Specific Handling required solving real low-resource-language problems, like correctly distinguishing Persian chapter headers from an unrelated common word with the same spelling. The frontend has full RTL support with proper Persian typography and layout, a detail most CAT tools skip entirely.

Results

  • Full end-to-end product built and deployed solo: a multi-table schema, a modular REST API, 3 independent async pipelines, a multi-page React SPA, and production infrastructure
  • In active daily use by 2 professional translators beyond myself
  • Multiple bugs and features shipped iteratively against real usage, from upload UX to glossary quality to backend reliability fixes
  • Zero-cost private inference for admin users via the home-GPU bridge, with cloud fallback for everyone else

Technical Challenges

One of the trickier issues was a data-handling edge case around how timestamps were stored, which I traced and resolved by standardizing the codebase on a single, consistent convention. Long-running background jobs also surfaced some subtle issues under the async database layer, which I addressed with a more robust session-handling pattern at the architecture level rather than patching around it. On the product side, the auto-generated terminology glossary was noisy at first; I iterated the extraction logic until it produced clean, usable results.

Stack

FastAPI, SQLAlchemy (async), PostgreSQL + pgvector (HNSW), React 18, React Router, Tailwind CSS, Vite, Ollama (self-hosted inference), BGE-M3, Aya Expanse 8B, OpenRouter, Docker Compose, Caddy, Tailscale.