Add model card.
Browse filesInitial draft of the model card.
README.md
CHANGED
@@ -2,22 +2,72 @@
|
|
2 |
language:
|
3 |
- en
|
4 |
- cy
|
5 |
-
license: apache-2.0
|
6 |
pipeline_tag: translation
|
7 |
tags:
|
8 |
- translation
|
9 |
- marian
|
10 |
metrics:
|
11 |
-
-
|
12 |
-
|
13 |
-
-
|
14 |
-
|
15 |
-
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
-
|
20 |
-
|
21 |
-
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
language:
|
3 |
- en
|
4 |
- cy
|
|
|
5 |
pipeline_tag: translation
|
6 |
tags:
|
7 |
- translation
|
8 |
- marian
|
9 |
metrics:
|
10 |
+
- bleu
|
11 |
+
- cer
|
12 |
+
- wer
|
13 |
+
- wil
|
14 |
+
- wip
|
15 |
+
- chrf
|
16 |
+
license: apache-2.0
|
17 |
+
model-index:
|
18 |
+
- name: "mt-dspec-health-en-cy"
|
19 |
+
results:
|
20 |
+
- task:
|
21 |
+
name: Translation
|
22 |
+
type: translation
|
23 |
+
metrics:
|
24 |
+
- name: SacreBLEU
|
25 |
+
type: bleu
|
26 |
+
value: 54.16
|
27 |
+
- name: CER
|
28 |
+
type: cer
|
29 |
+
value: 0.31
|
30 |
+
- name: WER
|
31 |
+
type: wer
|
32 |
+
value: 0.47
|
33 |
+
- name: WIL
|
34 |
+
type: wil
|
35 |
+
value: 0.67
|
36 |
+
- name: WIP
|
37 |
+
type: wip
|
38 |
+
value: 0.33
|
39 |
+
- name: SacreBLEU CHRF
|
40 |
+
type: chrf
|
41 |
+
value: 69.03
|
42 |
---
|
43 |
+
# mt-dspec-health-en-cy
|
44 |
+
A language translation model for translating between English and Welsh, specialised to the specific domain of Health and care.
|
45 |
+
|
46 |
+
This model was trained using custom DVC pipeline employing [Marian NMT](https://marian-nmt.github.io/),
|
47 |
+
the datasets prepared were generated from the following sources:
|
48 |
+
- [UK Goverment Legislation data](https://www.legislation.gov.uk)
|
49 |
+
- [OPUS-cy-en](https://opus.nlpl.eu/)
|
50 |
+
- [Cofnod Y Cynulliad](https://record.assembly.wales/)
|
51 |
+
- [Cofion Techiaith Cymru](https://cofion.techiaith.cymru)
|
52 |
+
|
53 |
+
The data was split into train, validation and tests sets, the test set containing health-spefic segemnts from TMX files
|
54 |
+
selected at random from the [Cofion Techiaith Cymru](https://cofion.techiaith.cymru) website, which have been pre-classified as pertaining to the specific domain.
|
55 |
+
Having extracted the test set, the aggregation of remaining data was then split into 10 training and valdiation sets, and fed into 10 marain training sessions.
|
56 |
+
|
57 |
+
## Evaluation
|
58 |
+
|
59 |
+
Evalatuaion was done using the python libraries [SacreBLEU](https://github.com/mjpost/sacrebleu) and [torchmetrics](https://torchmetrics.readthedocs.io/en/stable/).
|
60 |
+
|
61 |
+
## Usage
|
62 |
+
|
63 |
+
The mt-dspec-health-en-cy model can be used for inference directly as follows:
|
64 |
+
|
65 |
+
```python
|
66 |
+
import trnasformers
|
67 |
+
model_id = "techiaith/mt-spec-health-en-cy"
|
68 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
|
69 |
+
model = transformers.AutoModelForSeq2SeqLM.from_pretrained(model_id)
|
70 |
+
translate = transformers.pipeline("translation", model=model, tokenizer=tokenizer)
|
71 |
+
translated = translate("The doctor had many patients to attend to this morning.")
|
72 |
+
print(translated["translation_text"])
|
73 |
+
```
|