NheengatuMT · flagship 1.3B
Tradução automática português ↔ nheengatu (yrl), a Língua Geral Amazônica.
Este é o sistema principal do artigo: NLLB-200-distilled-1.3B com ajuste fino
completo, 20 mil passos, anotação de terminologia e pares de glossário.
Machine translation between Portuguese and Nheengatu (yrl), the Amazonian
Língua Geral. This is the paper's flagship system: NLLB-200-distilled-1.3B,
full fine-tuning, 20k steps, with terminology annotation and glossary token pairs.
⚠️ Leia antes de usar
Qual ortografia o sistema deve produzir é decisão da comunidade falante, não técnica. Este modelo produz uma tradição ortográfica específica, herdada das fontes de treino. A Academia da Língua Nheengatu foi contatada e não respondeu; silêncio não é tratado como consentimento. O glossário e as escolhas ortográficas são provisórios e derivados das fontes, não autoritativos.
Nenhum falante avaliou estas saídas. O protocolo de avaliação por falantes está construído e em campo, mas nenhum dado de falante foi analisado até agora. Tudo o que se sabe sobre a qualidade vem de métricas automáticas e de inspeção feita por quem não fala a língua.
Modos de falha conhecidos, medidos e documentados no artigo:
- Terminologia jurídica falha com confiança. Num teste com um artigo retido da Constituição, os sete modelos do projeto acertaram o arcabouço legal inteiro, incluindo a referência cruzada aos incisos, e os sete erraram a mesma palavra. No conjunto de teste jurídico, 8,7% dos tokens de conteúdo nunca ocorrem no treino e nenhum deles tem entrada no glossário, então nenhum mecanismo de terminologia alcança essa faixa.
- Degeneração em texto longo. Sob decodificação livre a repetição começa por volta de 40 palavras de fonte e vira laço a partir de ~60. O artigo mede 1,7% em beam-4 livre; decodificação restrita quintuplica isso.
- Fluência acima de adequação. As saídas são mais fluentes do que fiéis. Frases plausíveis que a fonte não diz são o modo de falha mais perigoso para uso comunitário, porque não parecem erro.
Posicionamento: apoio à escrita e à leitura, nunca tradução oficial.
⚠️ Read before using
Which orthography the system should produce is a decision for the speaker community, not a technical one. This model produces one specific orthographic tradition, inherited from its training sources. The Academia da Língua Nheengatu was contacted and did not respond; silence is not treated as consent. The glossary and orthographic choices are provisional and source-derived, not authoritative.
No speaker has evaluated these outputs. The speaker evaluation protocol is built and in the field, but no speaker data has been analysed so far. Everything known about quality comes from automatic metrics and from inspection by people who do not speak the language.
Known failure modes, measured and documented in the paper:
- Legal terminology fails confidently. On a held-out constitutional article, all seven models in the project got the entire legal frame right, including the cross-reference to numbered items, and all seven got the same word wrong. In the legal test set, 8.7% of content tokens never occur in training and none of them has a glossary entry, so no terminology mechanism can reach that zone.
- Degeneration on long text. Under free decoding, repetition starts at around 40 source words and turns into a loop past about 60. The paper measures 1.7% under free beam-4 decoding; constrained decoding multiplies that by five.
- Fluency exceeds adequacy. Outputs are more fluent than faithful. Plausible sentences that the source does not say are the most dangerous failure mode for community use, because they do not look like errors.
Positioning: writing and reading support, never official translation.
Resultados / Results
chrF++ no conjunto de teste, decodificado uma única vez / chrF++ on the test sets, decoded once:
| conjunto / set | pt→yrl | yrl→pt |
|---|---|---|
| jurídico, artigos retidos / legal, held-out articles | 31.70 | 37.39 |
| near-domain | 64.11 | 57.10 |
| fala espontânea / spontaneous speech | 45.24 | 49.67 |
Contra uma linha de base que copia a fonte, 13.8 no jurídico. / Against a copy-the-source baseline of 13.8 on legal text.
Este é o modelo com melhor terminologia, medida por terminology success
rate. O modelo irmão avg_1.3B_30k_ann03_lex
tem chrF++ melhor e terminologia pior: o artigo reporta os dois porque essa
dissociação é um dos seus resultados. /
This is the better model for terminology, measured by terminology success
rate. Its sibling has better chrF++ and worse terminology; the paper reports both
because that dissociation is one of its findings.
Como usar / How to use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
mid = "voz-ancestral/nheengatu-portuguese-nllb-1.3b"
tok = AutoTokenizer.from_pretrained(mid)
model = AutoModelForSeq2SeqLM.from_pretrained(mid).eval()
# português -> nheengatu
tok.src_lang = "por_Latn"
lote = tok(["Todos são iguais perante a lei."], return_tensors="pt", padding=True)
saida = model.generate(**lote,
forced_bos_token_id=tok.convert_tokens_to_ids("yrl_Latn"),
num_beams=4, max_length=192)
print(tok.batch_decode(saida, skip_special_tokens=True))
# nheengatu -> português: troque src_lang para "yrl_Latn" e o forced_bos para "por_Latn"
O token yrl_Latn foi acrescentado ao vocabulário do NLLB (id 256204) e
inicializado a partir do embedding do guarani (grn_Latn). O decoder acima
(beam 4, max_length 192) é o do artigo: use-o para reproduzir os números.
The yrl_Latn token was added to the NLLB vocabulary (id 256204) and
initialised from the Guarani embedding (grn_Latn). The decoder settings above
are the ones used in the paper; use them to reproduce the reported numbers.
Dados de treino
13.025 pares português-nheengatu de 14 fontes, mais 925 pares francês-nheengatu.
A tabela completa, com base legal, método de alinhamento e status do lado
português de cada camada, está em
docs/PROVENIENCIA.md.
A âncora é a tradução oficial da Constituição Federal para o nheengatu (STF/CNJ, 2023), alinhada por endereço jurídico: artigo, parágrafo, inciso e alínea, de modo que cada par carrega o endereço que o produziu.
Créditos obrigatórios
Marcel Twardowsky Avila. 2.745 pares vêm das frases-exemplo do dicionário da tese dele (USP, 2021), publicados com autorização escrita do autor, condicionada a crédito. Qualquer redistribuição precisa manter este crédito.
Os quinze tradutores indígenas do Alto Rio Negro e do Médio Tapajós que traduziram a Constituição ao longo de dois anos, sob revisão editorial do STF e do CNJ. O crédito a eles é obrigação ética do projeto, não formalidade legal.
Revista Leetra Indígena (UFSCar) e os autores dos quatro livros escolares bilíngues, e o corpus de fala espontânea Reich / Freie Universität Berlin (DOI 10.17169/refubium-39406).
Training data
13,025 Portuguese-Nheengatu pairs from 14 sources, plus 925 French-Nheengatu
pairs. The full table, with the legal basis, alignment method and Portuguese-side
status of every layer, is in
docs/PROVENIENCIA.md (in Portuguese).
The anchor is the official translation of the Brazilian Federal Constitution into Nheengatu (STF/CNJ, 2023), aligned by legal address: article, paragraph, inciso and alínea, so that every pair carries the address that produced it.
Mandatory credits
Marcel Twardowsky Avila. 2,745 pairs come from the example sentences of his doctoral dictionary (University of São Paulo, 2021), published with the author's written permission, conditional on credit. Any redistribution must keep this credit.
The fifteen Indigenous translators of the Upper Rio Negro and the Middle Tapajós who translated the Constitution over two years under the editorial review of the STF and the CNJ. Crediting them is an ethical obligation of this project, not a legal formality.
Revista Leetra Indígena (UFSCar) and the authors of its four bilingual school books, and the Reich / Freie Universität Berlin spontaneous speech corpus (DOI 10.17169/refubium-39406).
Licença / Licence
CC-BY-NC-4.0, herdada do NLLB-200 e não relicenciável. Uso não comercial.
O único artefato do projeto sem essa restrição é
qwen_s2_ckpt11000, derivado do
Qwen3.5 (Apache-2.0).
CC-BY-NC-4.0, inherited from NLLB-200 and not relicensable. Non-commercial use only. The only artefact in this project without that restriction is the Qwen-derived checkpoint.
Como citar / How to cite
@inproceedings{carraro-etal-2026-constitution,
title = {The Constitution Speaks Nheengatu: An Open {MT} System and
Reproducible Corpus Pipeline for the Amazonian L{\'i}ngua Geral},
author = {Carraro, Fabr{\'i}cio and Zevallos, Rodolfo Joel and
de Souza, Rodrigo Gon{\c{c}}alves and
da Silva, Caio Henrique Faustino and Ortega, John E.},
booktitle = {Proceedings of the Conference on Machine Translation (WMT)},
year = {2026}
}
Código, corpus e evidência / code, corpus and evidence: https://github.com/fabriciocarraro/NheengatuMT