[Paper Review] How Much Does Tokenization Affect Neural Machine Translation?
This study evaluates the impact of five tokenizers—SentencePiece, Mecab, Stanford Word Segmenter, Moses, and OpenNMT—on neural machine translation (NMT) quality across ten language pairs. It finds that tokenization significantly affects translation performance, with gains up to 12 BLEU and 15 TER points, and that the optimal tokenizer varies by language pair, with no single best tokenizer across all settings.
Tokenization or segmentation is a wide concept that covers simple processes such as separating punctuation from words, or more sophisticated processes such as applying morphological knowledge. Neural Machine Translation (NMT) requires a limited-size vocabulary for computational cost and enough examples to estimate word embeddings. Separating punctuation and splitting tokens into words or subwords has proven to be helpful to reduce vocabulary and increase the number of examples of each word, improving the translation quality. Tokenization is more challenging when dealing with languages with no separator between words. In order to assess the impact of the tokenization in the quality of the final translation on NMT, we experimented on five tokenizers over ten language pairs. We reached the conclusion that the tokenization significantly affects the final translation quality and that the best tokenizer differs for different language pairs.
Motivation & Objective
- To assess how different tokenization strategies affect neural machine translation (NMT) quality across diverse language pairs.
- To identify whether a single optimal tokenizer exists across multiple language pairs or if performance is language-pair-specific.
- To compare the effectiveness of morphological, statistical, and rule-based tokenizers in NMT systems.
- To provide empirical evidence on the impact of preprocessing on NMT performance, especially for low-resource or morphologically rich languages.
Proposed method
- Five tokenizers were applied to ten language pairs: SentencePiece (unigram model, 32k vocab), Mecab (Japanese morphological analyzer), Stanford Word Segmenter (Chinese CWS), Moses (standard NLP tokenizer), and OpenNMT (punctuation-based only).
- Each tokenizer was used to preprocess training, development, and test sets for NMT training.
- A standard NMT architecture based on bidirectional LSTM encoders and attention-enhanced decoder networks was used across all experiments.
- The model was trained using stochastic gradient descent to maximize log-likelihood on parallel monolingual corpora.
- BLEU and TER scores were computed to evaluate translation quality across all language pairs and tokenizers.
- Qualitative analysis was performed on translation outputs to assess fluency, accuracy, and word-level errors.
Experimental results
Research questions
- RQ1How does the choice of tokenizer affect the BLEU and TER scores in neural machine translation across different language pairs?
- RQ2Is there a single best tokenizer that consistently outperforms others across all language pairs?
- RQ3How do morphological and subword tokenizers compare to simple punctuation-based tokenizers in terms of translation quality?
- RQ4To what extent does the performance of subword tokenizers like SentencePiece depend on the size and nature of the training data?
- RQ5Why do certain tokenizers produce more fluent and accurate translations than others, especially in morphologically complex languages?
Key findings
- Tokenization has a significant impact on NMT quality, with performance differences of up to 12 BLEU points and 15 TER points across different tokenizers.
- SentencePiece achieved the best results for Arabic-to-English translation, while other tokenizers outperformed it in other language pairs.
- The Moses tokenizer produced the most accurate translations in qualitative examples, closely matching the reference translations in both English-to-German cases tested.
- SentencePiece and OpenNMT tokenizers produced translations with repeated or missing words, such as 'motor' being repeated and 'pilot' omitted in one example.
- The OpenNMT tokenizer, which only separates punctuation, performed poorly, especially in morphologically complex languages, due to insufficient segmentation.
- No single tokenizer was optimal across all language pairs; the best performer varied depending on the language pair and direction.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.