AI for translating scientific papers: terms, formulas and references
Scientific text breaks where ordinary translation goes smoothly: formulas, terms, references. A pipeline with formula protection, a glossary and checks, and what it costs.
5 min · · автоматизация · development
An AI for translating scientific papers handles smooth prose well, but formulas, references and terms cause problems: a symbol gets lost, a source number shifts, the same term is translated three ways. This is solved not by choosing the "smartest" model but by a careful pipeline around it: text preparation, formula protection, a term glossary, checks on the output. Below is such a pipeline with code and a cost calculation. It also suits queries like "translate a PDF with AI" if you first extract the text from the PDF correctly.
What breaks when translating scientific text
- Formulas. A model may "fix" a formula, change an index or rewrite the notation with other symbols.
- References and numbers.
[12],\cite{smith2020}, "Table 3", "Eq. (7)" must stay where they are. - Terms. The same English term gets different Russian equivalents in different places.
- Numbers and units. A decimal point becoming a comma is fine, a lost digit is not.
- Structure. Headings, figure captions, the reference list.
A translation of scientific work must always be checked by a specialist in the field. AI speeds up the draft but does not remove responsibility for the meaning. If the paper is unpublished or contains data that cannot be passed to third parties, check your organization's rules first.
Step 1. Get clean text
The best option is LaTeX sources if you have them (for arXiv papers they can be downloaded): the formulas are already written as text. If you only have a PDF, extract the text with the pdftotext utility from the poppler package:
pdftotext -layout paper.pdf paper.txtFor two-column papers line order can get mixed up, and formulas often turn into garbage. In that case hand the hard pages to a model that supports images: how to turn pages into pictures and send them in a request is described in how to recognize a PDF with AI.
Step 2. Protect formulas and references
The most reliable trick is to replace formulas and references with labels before translation and restore them afterwards. The model translates only the text, and what must not be touched it never sees.
import re
MATH = re.compile(r"\$\$.+?\$\$|\$[^$\n]+?\$|\\\[.+?\\\]", re.S)
CITE = re.compile(r"\\cite[tp]?\{[^}]*\}|\[\d+(?:[,–-]\s*\d+)*\]")
def protect(text: str):
store = {}
def sub(m):
key = f"⟦{len(store)}⟧"
store[key] = m.group(0)
return key
text = MATH.sub(sub, text)
text = CITE.sub(sub, text)
return text, store
def restore(text: str, store: dict) -> str:
for key, value in store.items():
text = text.replace(key, value)
return textThe regular expressions assume typical LaTeX and numbered references; you will need to adjust them for your format. Labels like ⟦12⟧ must be explained to the model in the prompt: "copy unchanged".
Step 3. Keep a glossary
A term dictionary solves the "three translations of one term" problem. First ask the model to list candidate terms from the text, then review and correct them yourself or with a colleague from the field. You get a list like:
attention head — голова внимания
fine-tuning — дообучение
ablation study — исследование с отключением компонентовThe glossary goes into the system message of every request. If a term is not in it, let the model keep the English original in parentheses at first mention: that immediately shows the doubtful spots.
Step 4. Translate by section and check the output
A long paper fits into the context whole (for the Claude and GPT models in our catalogue it is 1M tokens), but it is better to translate by section: that is easier to check and to repeat. An example with the OpenAI SDK:
from openai import OpenAI
client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")
SYSTEM = """You translate scientific text from English to Russian.
- Labels like ⟦12⟧ are formulas and references. Copy them unchanged in the same places.
- Translate terms strictly by the glossary. If a term is missing, keep the original in parentheses at first mention.
- Do not add, skip or shorten anything. Do not change numbers or units.
Glossary:
{glossary}"""
def translate(chunk: str, glossary: str) -> str:
r = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[
{"role": "system", "content": SYSTEM.format(glossary=glossary)},
{"role": "user", "content": chunk},
],
)
return r.choices[0].message.contentMachine checks worth running on every section:
import re
from collections import Counter
def labels_ok(src: str, out: str) -> bool:
return Counter(re.findall(r"⟦\d+⟧", src)) == Counter(re.findall(r"⟦\d+⟧", out))
def numbers(text: str) -> Counter:
text = re.sub(r"⟦\d+⟧", "", text)
return Counter(n.replace(",", ".") for n in re.findall(r"\d+(?:[.,]\d+)?", text))
def numbers_ok(src: str, out: str) -> bool:
return numbers(src) == numbers(out)If labels or numbers do not match, the section is translated again, and on a second failure goes to manual review. These checks catch losses but not errors of meaning: those need a human.
Step 5. Checking the meaning
- Selective reading by a specialist. The abstract, conclusions and sections with key claims are read by a person who knows the field.
- Back-translation. Translate the Russian text back into English with another model and compare it with the original: differences highlight places where meaning drifted. It is a hint, not proof.
- Reference list check. Do not translate titles of works in the list; keep them as in the original.
- Consistency. Search the text to confirm that glossary terms are translated identically everywhere.
What translating a paper costs
Formula: cost = input × input price / 1,000,000 + output × output price / 1,000,000. Assumptions for the example: source text 20,000 tokens; Russian translation 25,000 tokens (Russian is usually longer in tokens, we take no fixed ratio, measure it on your text via count_tokens); glossary and instructions 1,500 tokens in each of 10 requests, that is 15,000. Total input 20,000 + 15,000 = 35,000, output 25,000. Zukko prices as of October 18, 2026, $ per 1M tokens:
claude-sonnet-5-5(0.4 / 2): $0.4 × 0.035 + $2 × 0.025 = $0.014 + $0.05 = $0.064. At official prices (2 / 10): $2 × 0.035 + $10 × 0.025 = $0.07 + $0.25 = $0.32.claude-opus-5-5(0.8 / 4): $0.8 × 0.035 + $4 × 0.025 = $0.028 + $0.10 = $0.128.gpt-6.1-sol(0.27 / 1.32): $0.27 × 0.035 + $1.32 × 0.025 = $0.00945 + $0.033 = $0.04245.deepseek-v4.1-flash(0.013 / 0.038): $0.013 × 0.035 + $0.038 × 0.025 = $0.000455 + $0.00095 = $0.001405.
We do not recommend a model on translation quality: for specialist terminology compare a cheap model with a stronger one on the same passage of your paper. The strength index (Intelligence Index, Artificial Analysis) of the listed models is 48, 58, 52 and 39 respectively. Back-translation for checking roughly doubles the spend. Prices change; the current ones come from GET https://api.zukko.pro/v1/models. More on the API: chat completions. If you translate many files, see translating texts through the API: a pipeline for large volumes.
Create the key in the dashboard. The dollar balance is topped up from $1: SBP (the payment page adds 8.5% on top), crypto or a MasterCard card.
FAQ
Can I just upload a PDF to a model?
Through the API it is easier to work with text or page images. For PDFs with a normal text layer, extract the text first; for scans and complex formulas use a model that supports images.
How do I avoid losing formulas?
Replace them with labels before translation and restore them after, then compare the number of labels in the source and the result.
Is an AI translation enough for publication?
No. The draft must be proofread by a specialist in the subject, and the publisher's requirements for machine translation must be checked separately.
Which model should I take?
Start with a cheap one, run the same passage on two or three models and compare terms and accuracy. We do not claim any of them translates science better.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Translating subtitles with a neural network: SRT without broken timecodesThe main risk when translating SRT with a neural network is a broken file structure. A scheme where timecodes never reach the model, and a Python script with validation.
- Editing texts with a neural network: proofreading, style and cuttingDifferent kinds of editing need different prompts. Wording for proofreading, style and cutting, how to get edits with explanations and how not to lose the author's voice.
- A neural network for writing scripts: Bash, PowerShell and PythonA model writes scripts for routine fast, but running them blindly is risky. How to state the task, demand a safe dry-run mode and check the result before launch.
- Dify in Docker: installation, first-run setup and connecting modelsInstall Dify with Docker Compose, create the admin account and connect Claude, GPT and DeepSeek models on one key. Plus what to do when containers will not start.