Model Card for Model ID
This model translates English into French fine tuned to Moncton’s choice of French use words. It was fine-tuned from Helsinki-NLP/opus-mt-en-fr using French sentences provided by the City of Moncton (3261 pairs). The goal is to adapt a general English→French model to regional vocabulary, syntax, and style used in Moncton.
Model Details
Model Description
- Developed by: Projects by IF for the Municipality of Moncton, within the Artificial Intelligence Specialization of the Bloomberg Philanthropies City Data Alliance program
- Funded by: Bloomberg Philanthropies
- Model type: MarianMT (sequence-to-sequence, encoder–decoder transformer)
- Language(s) (NLP): English to Moncton French
- License: Apache licence 2.0
- Finetuned from model: Helsinki-NLP/opus-mt-en-fr
Model Sources
Uses
Direct Use
- Translate English municipal or social media communications into Moncton French.
- Support research on Moncton/Acadian French variation.
Downstream Use
- Fine-tune further for other Acadian French contexts (e.g., conversational, educational).
- Integrate into municipal translation pipelines.
Out-of-Scope Use
- Do not use for legal, medical, or safety-critical translations.
- Not intended as a general English→French translator (model is biased toward Moncton-specific usage).
Bias, Risks, and Limitations
- Training set is small (3261 paragraph pairs), limited to municipal/government style.
- Informal or conversational Moncton French may not be well represented.
- Because references were sometimes inconsistently aligned, automatic scores may underestimate quality.
- Risk of reinforcing stylistic bias toward institutional language rather than everyday Moncton French.
Recommendations
- Treat outputs as drafts for human review, not final translations.
- Be aware of stylistic bias toward municipal communications.
How to Get Started with the Model
from transformers import MarianMTModel, MarianTokenizer
model_name = "Projects-by-IF/ENFR_custom_translation_v1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
src_text = ["Reminder that vehicles cannot park on any street from December 1 to April 15 between midnight and 7 a.m."]
inputs = tokenizer(src_text, return_tensors="pt", padding=True, truncation=True, max_length=512)
translated = model.generate(**inputs, max_new_tokens = 128, num_beams=1)
output = tokenizer.decode(translated[0], skip_special_tokens=True)
print(output)
Training Details
Training Data
Training was done on 3261 French sentences provided by the City of Moncton.
Training Procedure
Preprocessing
The text was cleaned (including removing emojis and symbols) and individual French sentences were isolated. Duplicate entries and single word sentences were also removed. The French sentences were then translated to English using the Helsinki-NLP/opus-mt-fr-en model. This was done to bypass the need for fully aligned Fr-En sentence pairs. These pairs of translated English sentences, along with their original French sentences from the city of Moncton, are what was used to fine tune the model.
Evaluation
Testing Data, Factors & Metrics
Testing Data
Testing was done on 604 French sentences provided by the City of Moncton, along with their corresponding translated English sentences (see above).
Metrics
BERTScore was used to evaluate the similarity between the original sentence provided by the city and the sentence resulting from the translation process.
Results
On average the evaluation showed a 92.1% similarity on the testing data (as opposed to a 88.7% similarity if using the baseline model Helsinki-NLP/opus-mt-en-fr)
Model Card Authors
Projects by IF https://www.projectsbyif.com/ for the Municipality of Moncton, within the framework of the Artificial Intelligence Specialization of the Bloomberg Philanthropies City Data Alliance program.
Model Card Contact
weare@projectsbyif.com - Projects by IF opendata@moncton.ca - City of Moncton
- Downloads last month
- 4
Model tree for Projects-by-IF/ENFR_custom_translation_v1
Base model
Helsinki-NLP/opus-mt-en-fr