File size: 5,552 Bytes
94ec463
 
9af6c65
 
 
4ea7c1f
 
 
 
94ec463
f998837
47695a5
f998837
42647dd
9b024b5
42647dd
47695a5
befa12c
f998837
14a5b6c
2e3c21d
 
 
f998837
 
 
 
14a5b6c
f998837
14a5b6c
32a723c
e9337b0
9b024b5
e9337b0
f998837
64d072b
9b024b5
f998837
9b024b5
64d072b
9b024b5
64d072b
9b024b5
f998837
64d072b
 
 
 
f998837
9b024b5
f998837
64d072b
 
9b024b5
 
 
f998837
7a6fd74
b00d2fd
43f8c15
55c8779
b00d2fd
 
 
f998837
b3359f7
f998837
0d51682
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f998837
9b024b5
f998837
0d51682
 
 
d66c5c4
 
f998837
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
license: mit
language:
- gl
metrics:
- bleu (Gold1): 79.6
- bleu (Gold2): 43.3
- bleu (Flores): 21.8
- bleu (Test-suite): 74.3
---

**Descrici贸n do Modelo / Model description** 

Modelo feito con OpenNMT para o par espa帽ol-galego utilizando unha arquitectura transformer.

Model developed with OpenNMT for the Spanish-Galician pair using a transformer architecture.

**Como traducir / How to translate**

+ Abrir terminal bash / Open bash terminal
+ Instalar / Install [Python 3.9](https://www.python.org/downloads/release/python-390/) 
+ Instalar / Install [Open NMT toolkit v.2.2](https://github.com/OpenNMT/OpenNMT-py)
+ Traducir un input_text utilizando o modelo NOS-MT-es-gl co seguinte comando / Translate an input_text using the NOS-MT-en-gl model with the following command:

```bash 
onmt_translate -src input_text聽-model NOS-MT-es-gl -output ./output_file.txt -replace_unk -phrase_table phrase_table-es-gl.txt -gpu 0
```
+ O resultado da traduci贸n estar谩 no PATH indicado no flag -output / The result of the translation will be in the PATH indicated by the -output flag.

**Adestramento / Training**

No adestramento, utilizamos corpora aut茅nticos e sint茅ticos do [ProxectoN贸s](https://github.com/proxectonos/corpora). Os primeiros son corpora de traduci贸ns feitas directamente por tradutores humanos. Os segundos son corpora de traduci贸ns espa帽ol-portugu茅s, que convertemos en espa帽ol-galego a trav茅s da traduci贸n autom谩tica portugu茅s-galego con Opentrad/Apertium e transliteraci贸n para palabras f贸ra de vocabul谩rio.

In the training we have used authentic and synthetic corpora from [ProxectoN贸s](https://github.com/proxectonos/corpora). The former are corpora of translations directly produced by human translators. The latter are corpora of spanish-portuguese translations, which we have converted into spanish-galician by means of portuguese-galician translation with Opentrad/Apertium and transliteration for out-of-vocabulary words. 


**Procedemento de adestramento / Training process**

+ Tokenization dos datasets feita co tokenizador de linguakit / Tokenization of the datasets made with linguakit tokeniser https://github.com/citiususc/Linguakit

+ O vocabulario para os modelos foi xerado a trav茅s do script / Vocabulary for the models was created by the script [learn_bpe.py](https://github.com/OpenNMT/OpenNMT-py/blob/master/tools/learn_bpe.py) da open NMT

+ Usando o .yaml neste repositorio pode replicar o proceso de adestramento do seguinte xeito / Using the .yaml in this repository you can replicate the training process as follows

```bash 
onmt_build_vocab -config  bpe-es-gl_emb.yaml -n_sample 100000
onmt_train -config bpe-es-gl_emb.yaml
```

**Hiperpar谩metros / Hyper-parameters** 

Os par谩metros usados para o desenvolvimento do modelo poden ser consultados directamente no mesmo ficheiro .yaml  bpe-es-gl_emb.yaml 

The parameters used for the development of the model can be directly viewed in the same .yaml file bpe-es-gl_emb.yaml 

**Avaliaci贸n / Evaluation**

A avaliaci贸n BLEU dos modelos 茅 feita cunha mistura de tests desenvolvidos internamente (gold1, gold2, test-suite) con outros datasets dispon铆beis en galego (Flores).

The BLEU evaluation of the models is done by mixing internally developed tests (gold1, gold2, test-suite) with other datasets available in Galician (Flores).

| GOLD 1        | GOLD 2        | FLORES  | TEST-SUITE|
| ------------- |:-------------:| -------:|----------:| 
| 79.6          | 43.3          | 21.8    | 74.3      |

**Licenzas do Modelo / Licensing information** 

MIT License

Copyright (c) 2023 Proxecto N贸s

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

**Financiamento / Funding** 

Esta investigaci贸n foi financiada polo proxecto "N贸s: o galego na sociedade e econom铆a da intelixencia artificial", resultado dun acordo entre a Xunta de Galicia e a Universidade de Santiago de Compostela, o que resultou no subsidio ED431G2019/04 da Consellar铆a de Educaci贸n, Universidade e Formaci贸n Profesional da Galiza, e polo Fondo Europeo de Desenvolvemento Rexional (programa ERDF/FEDER), e Grupos de Referencia: ED431C 2020/21.  

This research was funded by the project "N贸s: Galician in the society and economy of artificial intelligence", agreement between Xunta de Galicia and University of Santiago de Compostela, and grant ED431G2019/04 by the Galician Ministry of Education, University and Professional Training, and the European Regional Development Fund (ERDF/FEDER program), and Groups of Reference: ED431C 2020/21.
 
**Citation Information**