affine_translate_text
ONE CALL, ONE STATE, EVERY LANGUAGE A PROJECTION: pass target_langs (or [""]) to seal the texts' state once and receive one projection per language, each a stateless map of that same state; target_lang alone returns one. Instant meaning translator on the substrate's own ψ chart — no model anywhere, no float anywhere. The chart is COUNTED, in exact integers, from text people wrote: the UN Universal Declaration of Human Rights in every served language, the site's sealed templates, and Tatoeba sentence pairs (CC BY 2.0 FR, each sentence's author recorded in the corpus's .PROVENANCE). ONE basis for every language: the axes are the 512 most frequent English words, and a word's row in any language is how often it co-occurs with each axis word in the ENGLISH sentence of the same meaning (its parallel pair), so agua, eau, Wasser, вода and 水 land in one region because they mean one thing. Thai is segmented against a human-compiled word list (ICU); a Han ideograph is one word. A word crosses only when its round trip closes over the exact 256-bit order; a word that does not is CARRIED verbatim in the source language and named — never replaced by a nearest-row guess. The receipt names its lattice: lattice.source is human-text (with digest, axes, rows, dimension, network=none, languages) or model (digest, model, revision, tensor) — read it, do not assume which chart a cell is on — and engine ends in /human-text when the human chart answered. A sealed sentence (a projection sealed by a named author into the append-only language ledger; GET /language-invariant/translate/templates lists them) is taken before the chart. NUMBERS FOLLOW THE SOURCE: a sealed sentence answers every numeric variant of its text; where it writes {n} the text's numbers go in, in order; where it writes numbers literally, each number the text changes is replaced where the sealed wording carries it as digits; when the sealed wording cannot carry the text's number (spelled out, another script's digits, a different count) the sealed sentence is NOT used and numbers[i] names why — the court prints no number the text does not say. status, single target (target_lang): RENDERED (every word crossed), PARTIAL (some texts carry words, or some texts are null and named in missing), REFUSED_NO_PROJECTION (nothing crossed), REFUSED_NO_CHART (no chart and no sealed sentence for the pair; names the chart languages and the pairs served), REFUSED_NO_SOURCE ('auto' or empty source_lang), REFUSED_NO_TARGET (neither key sent, or the one key sent names no language: an empty string or an empty array, named in detail), REFUSED_AMBIGUOUS_TARGET (both KEYS sent, whatever their values — a string, null, an array of anything; refused at the top naming each value exactly as sent, nothing projected — the court does not choose), REFUSED_BAD_TARGET (the one key sent is not its declared type — target_lang not a string, target_langs not an array of strings, including an array with one non-string element; names the value as sent, nothing dropped or coerced), REFUSED_EMPTY, REFUSED_BATCH_TOO_LARGE (more than 64 texts or 64 KiB; checked before anything is sealed, on both forms, and on the one-call form refused at the top with no projections). status, one call (target_langs): PROJECTED — shape {state:{status,digest,steps,torsion,turns,dimension}, projections:{:}, targets, rendered, partial, refused, templates, lattice}; every projection is one of RENDERED / PARTIAL / a REFUSED_ by name, and rendered+partial+refused == targets.length; REFUSED_NO_PROJECTION when no language rendered or partially rendered. Every single-target receipt also carries, aligned with texts: provenance[i] — when a sealed sentence answered, {key, entry_digest, row_digest (the ledger row that sealed it), ledger_row (the route that returns that row), sealed_by, sealed_at, status: sealed|verified, verified, verified_by, verified_at, verifications, supersedes (the entry_digest of the sealed sentence it replaced), template_digest (sha256 of the pair's ledger projection), source: ledger|file, numbers}; null when the chart answered or nothing did. words[i] — [{src, dst|null, crossed, reason: closed|shared|shear|margin|oov|particle, runner_up, best_dot, best_n, second_dot, second_n}], the exact integers the separability law compared, so the verdict is recomputable at any margin; empty when a sealed sentence answered. reading[i] — one English sentence a person can read without the source, e.g. "4 of 9 words crossed; water, nine, the stayed in English — the chart could not tell water from esponja". numbers[i] — when a sealed sentence matched, {mode: none|same|slots|digits|refused, sealed, source, substituted, refused?}; null otherwise; verdicts[i] is REFUSED_TEMPLATE_NUMBERS when a sealed sentence was refused on its numbers and no chart could read the text. The older verdicts strings stay for compatibility. Every receipt carries templates {pairs, entries, verified, superseded} — the sealed store's four integers, the same healthz serves in translate_chart.templates — and lattice.templates beside the chart digest when the chart answered. exact is a JSON boolean. source_lang is required — the court does not infer a source. Exactly one of target_lang or target_langs, judged on the KEYS sent: both keys is REFUSED_AMBIGUOUS_TARGET whatever the values, neither is REFUSED_NO_TARGET, the wrong type is REFUSED_BAD_TARGET. Batch: texts (array, up to 64 texts, 64 KiB total) returns texts in order, one line each; text renders one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | one source text to render. e.g. Book | |
| texts | No | up to 64 source texts; rendered in order, one line each. e.g. ["Book","Water"] | |
| source_lang | Yes | ISO 639-1 source language; required, 'auto' refused. e.g. en | |
| target_lang | No | exactly one of target_lang or target_langs (both keys sent, whatever their values, is REFUSED_AMBIGUOUS_TARGET; sent as anything but a string is REFUSED_BAD_TARGET; sent empty is REFUSED_NO_TARGET). ISO 639-1 target language for a single projection. Declared: ar bn de en es fa fr he hi id it ja ko ms nl pl pt ru sw th tr uk ur vi zh. The pairs a cell can actually answer are what its warmed chart reports (healthz translate_chart.languages, the receipt's lattice.languages); a pair outside them is REFUSED_NO_CHART naming the languages served. e.g. es | |
| target_langs | No | exactly one of target_lang or target_langs (both keys sent, whatever their values, is REFUSED_AMBIGUOUS_TARGET; sent as anything but an array of strings is REFUSED_BAD_TARGET; sent empty is REFUSED_NO_TARGET). ONE CALL, ONE STATE: an array of ISO 639-1 codes, or ["*"] for every language the chart serves; the texts' state is sealed once and returned as one projection per language under `projections`, each carrying the same `state_digest`; status PROJECTED. e.g. ["es","fr"] |