Evaluating machine translations
Vaswani et al. (2017) presented the Original Transformer’s achievements in the Workshop on Statistical Machine (WMT) 2014 English-to-German translation task and the WMT 2014 English-to-French translation task. The Original Transformer achieved a state-of-the-art BLEU score. BLEU will be described in the Evaluating machine translation with BLEU section of this chapter.
However, we must begin by preprocessing the WMT dataset we will examine.
Preprocessing a WMT dataset
The 2014 WMT contained several European language datasets. One dataset contained data from version 7 of the Europarl
corpus. We will use the French-English dataset from the European Parliament Proceedings Parallel Corpus, 1996–2011 (https://www.statmt.org/europarl/v7/fr-en.tgz).
Open WMT-translations.ipynb
, which is in the chapter directory of the GitHub repository.
The first step is to download the files we need:
import urllib.request
# Define the...