NheengatuMT · avg 1.3B
Tradução automática português ↔ nheengatu (yrl). NLLB-200-distilled-1.3B
com ajuste fino completo, média dos checkpoints dos passos 29.000 e 30.000.
Machine translation between Portuguese and Nheengatu (yrl).
NLLB-200-distilled-1.3B, full fine-tuning, average of the checkpoints at steps
29,000 and 30,000.
⚠️ 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 | 32.78 | 38.14 |
| near-domain | 64.54 † | 58.76 |
| fala espontânea / spontaneous speech | 47.45 | 49.37 |
† Removidos os itens com sobreposição de conteúdo com o treino, cai para 62.10. O artigo reporta os dois números. / † Removing the items with target-side content overlap against training lowers this to 62.10. The paper reports both.
Melhor chrF++ e pior terminologia do projeto. Essa dupla dissociação é
deliberadamente publicada: uma métrica sozinha não resume qualidade, e este
modelo é a prova. Se o seu uso depende de termos corretos, prefira
flagship_1.3B_20k_ann03_lex. /
Best chrF++ and worst terminology in the project. That double dissociation is
published on purpose: one metric does not summarise quality, and this model is the
evidence. If your use depends on correct terms, prefer the flagship.
⚠️ Este modelo é o mais propenso a reproduzir material de treino quando a entrada se parece com uma frase vista no treino. Medido: com uma paráfrase mínima a recuperação já desaparece, mas com a frase literal ele devolve a referência de treino quase palavra por palavra. / This model is the most prone to reproducing training material when the input resembles a sentence seen in training. Measured: a minimal paraphrase already breaks the retrieval, but on the literal sentence it returns the training reference almost word for word.
Como usar / How to use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
mid = "voz-ancestral/nheengatu-portuguese-nllb-1.3b-avg"
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. / CC-BY-NC-4.0, inherited from NLLB-200, not relicensable. Non-commercial only.
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