| --- |
| license: mit |
| language: |
| - gl |
| - es |
| - en |
| - eu |
| - ca |
| metrics: |
| - bleu average (Flores): 25.1 |
| --- |
| |
| **English text [here](https://huggingface.co/proxectonos/Nos_MT-OpenNMT-multilingual/blob/main/README_English.md)** |
|
|
| **Descrición do Modelo** |
|
|
| Modelo feito con OpenNMT-py 3.2 para as línguas do Reino de España e inglés utilizando unha arquitectura transformer. O modelo foi transformado para o formato da ctranslate2. |
|
|
| **Como usar este Modelo** |
|
|
| + Instalar o [Python 3.9](https://www.python.org/downloads/release/python-390/) |
| + Instalar o [ctranslate 3.2](https://github.com/OpenNMT/CTranslate2) |
| + Instalar o subword_nmt: |
| ```bash |
| pip install subword-nmt |
| ``` |
| + Etiquetar o ficheiro input com a etiqueta da lingua target |
| ```bash |
| sed -i "s/^/<$tgt_tag>/" $input_file |
| `` |
| ```bash |
| subword_nmt.apply_bpe -c ./bpe/mnmt_25.bpe < input.txt > input.bpe |
| ``` |
| ```bash |
| python3 translate.py ./ct2-multi input.bpe > output.txt |
| ``` |
| ```bash |
| sed -i 's/@@ //g' output.txt |
| ``` |
| |
| **Adestramento** |
|
|
| No adestramento, utilizamos córpora auténticos e sintéticos do [ProxectoNós](https://github.com/proxectonos/corpora). Os primeiros son córpora de traducións feitas directamente por tradutores humanos. É importante salientar que a pesar destes textos seren feitos por humanos, non están libres de erros lingüísticos. Os segundos son córpora de traducións que contén español ou portugués, que convertemos en galego a través da tradución automática con Opentrad/Apertium e transliteración para palabras fóra de vocabulario. |
|
|
| **Procedemento de adestramento** |
|
|
| + Tokenización dos datasets feita co tokenizador (tokenizer.pl) de [linguakit](https://github.com/citiususc/Linguakit) que foi modificado para evitar o salto de liña por token do ficheiro orixinal. |
|
|
| + O vocabulario BPE 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 |
|
|
|
|
| **Avaliación** |
|
|
| 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). |
|
|
| | ca-en | ca-es | ca-eu | ca-gl | en-ca | en-es | en-eu | en-gl | es-ca | es-en | es-eu | eu-es | es-gl | eu-ca | eu-en | eu-gl | gl-ca | gl-en | gl-es | gl-eu | AVERAGE | |
| |----------|----------|----------|----------|----------|----------|----------|----------|----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------| |
| | 39.6 | 23.6 | 16.3 | 30.9 | 39.8 | 24.5 | 18.6 | 31.9 | 22.9 | 24.6 | 13.0 | 17.8 | 22.0 | 23.0 | 26.1 | 21.5 | 30.9 | 34.9 | 23.7 | 16.4 | 25.1 | |
|
|
|
|
| **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** |
|
|
| This model was developed within the Nós Project, funded by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the [project ILENIA] (https://proyectoilenia.es/) with reference 2022/TL22/00215336. |
|
|
| **Citar este traballo** |
|
|
| Se utilizar este modelo no seu traballo, cite por favor así: |
|
|
| Daniel Bardanca Outeirinho, Pablo Gamallo Otero, Iria de-Dios-Flores, and José Ramom Pichel Campos. 2024. |
| Exploring the effects of vocabulary size in neural machine translation: Galician as a target language. |
| In Proceedings of the 16th International Conference on Computational Processing of Portuguese, pages 600–604, |
| Santiago de Compostela, Galiza. Association for Computational Lingustics. |
|
|
|
|