File size: 4,201 Bytes
8663f4d
 
bd4ec79
 
 
 
 
 
 
f72749f
 
 
 
bc146bd
 
8aba977
f72749f
8aba977
f72749f
8aba977
f72749f
8aba977
 
 
 
f72749f
 
c8ffa41
f72749f
8aba977
f72749f
8aba977
f72749f
0fc0efc
8aba977
f72749f
bd4ec79
f72749f
dd2385b
f72749f
db070bb
e8817e3
8aba977
e8817e3
 
 
 
 
f72749f
8aba977
f72749f
ab679ae
f72749f
cde8f5e
 
a77a6be
 
3968ebd
 
 
 
 
f72749f
8aba977
bd4ec79
 
 
 
f72749f
bd4ec79
 
 
 
 
 
f72749f
bd4ec79
 
 
 
 
 
 
 
 
 
f72749f
8aba977
f72749f
a02febf
f72749f
a02febf
0a66fe0
 
40d9e40
 
4b455c2
 
 
40d9e40
 
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
99
100
101
102
---
license: mit
language:
- gl
metrics:
- bleu (Gold1): 36.8
- bleu (Gold2): 47.1
- bleu (Flores): 32.3 
- bleu (Test-suite): 42.7 
---
license: mit
---

**English text [here](https://huggingface.co/proxectonos/NOS-MT-OpenNMT-en-gl/blob/main/README_English.md)**

**Descrici贸n do Modelo**

Modelo feito con OpenNMT para o par ingl茅s-galego utilizando unha arquitectura transformer.

**Como traducir**

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

```bash 
onmt_translate -src input_text聽-model NOS-MT-en-gl.pt --output ./output_file.txt --replace_unk -gpu 0
```
+ O resultado da traduci贸n estar谩 no PATH indicado no flag -output.

**Adestramento**

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 ingl茅s-portugu茅s, que convertemos en ingl茅s-galego a trav茅s da traduci贸n autom谩tica portugu茅s-galego con Opentrad/Apertium e transliteraci贸n para palabras f贸ra de vocabulario.
 

**Procedemento de adestramento / Training process**

+ Tokenizaci贸n dos datasets feita co tokenizador de LinguaKit https://github.com/citiususc/Linguakit

+ O vocabulario para os modelos foi xerado a trav茅s do script [learn_bpe.py](https://github.com/OpenNMT/OpenNMT-py/blob/master/tools/learn_bpe.py) da OpenNMT

+ Usando o .yaml neste repositorio pode replicar o proceso de adestramento do seguinte xeito

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

**Hiperpar谩metros** 

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

**Avaliaci贸n**

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

| GOLD 1        | GOLD 2        | FLORES  | TEST-SUITE|
| ------------- |:-------------:| -------:|----------:| 
| 36.8          | 47.1          | 32.3    | 42.7      |



**Licenzas do Modelo** 

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** 

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.  

 
**Citar este traballo**

Se utilizar este modelo no seu traballo, cite por favor as铆:

Gamallo, Pablo; Bardanca, Daniel; Pichel, Jos茅 Ramom; Garc铆a, Marcos; Rodr铆guez-Rey, Sandra; de-Dios-Flores, Iria. 2023. 
NOS-MT-OpenNMT-en-gl. Url: https://huggingface.co/proxectonos/NOS-MT-OpenNMT-en-gl