Nos_MT-OpenNMT-es-gl / README_English.md
imdbo's picture
update model to ct2
436467d
|
raw
history blame
4.65 kB
metadata
license: mit
language:
  - gl
metrics:
  - bleu (Gold1): 79.6
  - bleu (Gold2): 43.3
  - bleu (Flores): 21.8
  - bleu (Test-suite): 74.3

English text here

Model Description

Model created with OpenNMT-py 3.2 for the Spanish-Galician pair using a transformer architecture. The model was converted to the ctranslate2 format.

How to Translate with this Model

  • Install Python 3.9
  • Install ctranslate 3.2
  • Translate an input_text using the NOS-MT-es-gl model with the following command:
    perl tokenizer.perl < input.txt > input.tok
    subword_nmt.apply_bpe -c ./bpe/es.bpe < input.tok > input.bpe
    python3 translate.py ./ct2-es-gl_12L input.bpe > output.txt
    ': sed -i 's/@@ //g' output.txt

Training

We used authentic and synthetic corpora from the ProxectoNós. The former are translation corpora made directly by human translators. It is important to note that despite these texts being made by humans, they are not free from linguistic errors. The latter are Spanish-Portuguese translation corpora, which we converted into Spanish-Galician through Portuguese-Galician automatic translation with Opentrad/Apertium and transliteration for out-of-vocabulary words.

Training Procedure

  • Tokenization of the datasets was done with the tokenizer (tokenizer.pl) from linguakit which was modified to avoid line breaks per token from the original file.

  • The BPE vocabulary for the models was generated through the learn_bpe.py script from OpenNMT.

  • Using the .yaml from this repository, you can replicate the training process. It is necessary to modify the paths in the .yaml file for Open NMT to know where to find the texts. After doing this, you can start the process as follows:

onmt_build_vocab -config  bpe-es-gl_emb.yaml -n_sample 40000
onmt_train -config bpe-es-gl_emb.yaml

Hyperparameters

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

Evaluation

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

GOLD 1 GOLD 2 FLORES TEST-SUITE
79.5 43.5 21.4 73.4

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.

Funding

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

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.