mt-dspec-health-en-cy
A language translation model for translating between English and Welsh, specialised to the specific domain of Health and care.
This model was trained using custom DVC pipeline employing Marian NMT, the datasets prepared were generated from the following sources:
The data was split into train, validation and tests sets, the test set containing health-specific segments from TMX files selected at random from the Cofion Techiaith Cymru website, which have been pre-classified as pertaining to the specific domain. Having extracted the test set, the aggregation of remaining data was then split into 10 training and validation sets, and fed into 10 marian training sessions.
A website demonstrating use of this model is available at http://cyfieithu.techiaith.cymru.
Evaluation
Evaluation was done using the python libraries SacreBLEU and torchmetrics.
Usage
Ensure you have the prerequisite python libraries installed:
# The constraint imposed on the transformers version below
# is due to the following issue:
# https://github.com/huggingface/transformers/issues/26271
pip install sentencepiece "transformers>4.26.1<=4.30.2"
import trnasformers
model_id = "techiaith/mt-spec-health-en-cy"
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
model = transformers.AutoModelForSeq2SeqLM.from_pretrained(model_id)
translate = transformers.pipeline("translation", model=model, tokenizer=tokenizer)
translated = translate("The doctor will be late to attend to patients this morning.")
print(translated["translation_text"])
- Downloads last month
- 24
Collection including techiaith/mt-dspec-health-en-cy
Evaluation results
- SacreBLEU on variousself-reported54.160
- CER on variousself-reported0.310
- WER on variousself-reported0.470
- WIL on variousself-reported0.670
- WIP on variousself-reported0.330
- SacreBLEU CHRF on variousself-reported69.030