Translation settings
Project → Settings → Translation (/settings/translation).
Translation Memory (TM) and glossary for the project — fuzzy-match suggestions and preferred terms shown to annotators while they translate.
When the tab appears: only on projects whose labeling config
contains a TextArea tag (translation, transcription,
post-editing). No TextArea, no tab.
Permissions: any member of the project's organization can read the TM/glossary (annotators consume them through suggestions); adding, importing, backfilling, extracting, and deleting require the Owner or Admin org role.
Inline suggestions toggle
Show inline suggestions to annotators (on by default) — controls whether TM matches and glossary terms are offered in the labeling interface. When off, the suggest endpoint returns nothing and annotators see no panel.
While the toggle is on, a Suggestion sources selector scopes whose memory and glossary feed this project's suggestions:
| Scope | Suggestions come from |
|---|---|
| This project only | This project's own TM + glossary |
| Entire organization (default) | Every project in the org |
| Selected projects | This project plus a checklist of other org projects you tick |
Suggestions are also language-scoped: entries must match the project's annotator language (its translation target), so an org-wide search on a Hausa project won't surface Yoruba segments. Entries with no language tag (e.g. hand-added pairs) always remain findable.
What annotators see
A Translation suggestions panel under the TextArea:
- Memory chips — fuzzy TM matches with a match % (Levenshtein ratio on lowercased, whitespace-collapsed text; ≥ 60% shown, top 5). Click one to fill the draft with that translation.
- Glossary chips — terms whose source appears in the text (case-insensitive, whole-word). Click to append the target term to the draft.
The panel renders nothing when there are no matches, and is inert on read-only annotations.
Translation Memory card
Reusable source → target segments offered as fuzzy matches.
| Action | What happens |
|---|---|
| Add | Creates a segment from the Source text / Target text inputs. Exact duplicates are merged, not doubled |
| Search | Filters the list by substring match on the source text |
| Import TMX | Upload a .tmx file. Parses TMX (two-tuv shape: first = source, second = target), bulk-inserts up to 50,000 segments per import, skips duplicates, and reports "Imported X of Y segments" |
| Export TMX | Downloads the project's TM as a TMX 1.4 file (project-<id>-tm.tmx, up to 50,000 segments) — portable to CAT tools and other AfriAnnotate projects |
| Backfill from translations | Seeds the TM from work already done in this project: enter the task-data field that holds the source text (e.g. src); each non-cancelled annotation's TextArea answer becomes the target for that task's source. Scans up to 20,000 annotations, skips duplicates |
| Delete | Removes a single segment |
The list shows the total segment count and the first 100 rows (narrow it with search).
Glossary card
Preferred source → target terms enforced for consistency.
| Action | What happens |
|---|---|
| Add | Creates a term (source, target, optional note). One entry per source term — re-adding the same source updates its target/note |
| Suggest terms from memory | Auto term extraction: mines the project's TM (up to 10,000 pairs) for frequent source n-grams (1–2 words, seen ≥ 3 times, up to 50 candidates) with a rough aligned target guess. Candidates render as review chips |
| Save N suggestions | Persists the candidates as glossary terms. Only new source terms are created — existing entries are left untouched. Review and edit the guesses afterwards; extraction is a heuristic seed, not a final glossary |
| Delete | Removes a term |
API
All endpoints live under /api/projects/<id>/translation/:
| Endpoint | Method | Purpose |
|---|---|---|
suggest?text=… | GET | TM fuzzy matches + glossary hits for a source text (threshold, top_k optional) |
memory | GET / POST | List (paged, q= search) / add segments |
memory/<entry_id> | DELETE | Delete a segment |
memory/import-tmx | POST | TMX file upload |
memory/export-tmx | GET | TMX 1.4 download |
memory/backfill | POST | Seed TM from existing annotations ({"source_field": "src"}) |
glossary | GET / POST | List / add terms |
glossary/<term_id> | DELETE | Delete a term |
glossary/extract | POST | Auto term extraction (min_count, max_terms, save) |
API-only extras (not surfaced in this tab): import-xliff creates
one task per XLIFF 1.2/2.x <trans-unit> — units that already
carry a <target> get a pre-seeded annotation for post-editing —
and import-docx flattens a Word document into one task per
paragraph (table cells included).
What's next
- Set up a translation project → — the end-to-end recipe this tab plugs into
- RTL / non-Latin scripts → — bidi-correct rendering for Arabic-script and other targets
- Quality settings → — agreement metrics
for
TextAreaanswers (edit distance, WER, chrF)