NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the Use of Machine Translation-Based Approaches for Vietnamese Diacritic Restoration

Thai-Hoang Pham, Xuan-Khoai Pham, Phuong Le-Hong

In natural language processing (NLP), specific scripts present unique challenges that require tailored solutions. Vietnamese, while utilizing a Romanized alphabet, relies heavily on a complex system of diacritic marks to convey both semantic meaning and tonal inflection. Without these marks, the language becomes highly ambiguous, creating a significant hurdle for automated text processing. Researchers from Alt Inc, FPT University, and Vietnam National University have proposed a novel framework for this problem: treating diacritic restoration not as a simple character classification task, but as a machine translation (MT) problem.

The Linguistic Challenge: Ambiguity in Vietnamese

Vietnamese diacritics are categorized into two primary types. Type-1 diacritics modify the base character itself (e.g., transforming a into ă or â), while Type-2 diacritics indicate the tone of the word. Statistics suggest that approximately 95% of Vietnamese words contain these marks. When diacritics are removed—a common occurrence in rapid mobile messaging or due to software limitations—nearly 80% of the resulting text becomes ambiguous.

Table 1: Mapping of non-diacritic characters to their Type 1 and Type 2 diacritic variations, illustrating the high degree of linguistic ambiguity.

As shown in the table above, a single non-diacritic character like 'a' can map to over a dozen possible variations. This creates scenarios where a sentence like "Co ay rat dam dang" could be interpreted as "Cô ấy rất đảm đang" (She is very capable) or, far more inappropriately, "Cô ấy rất dâm đãng". Traditional solutions often relied on rigid dictionaries or complex rule-based systems that struggled with context; the MT-based approach seeks to "translate" this mark-less source text into standard, grammatically correct Vietnamese.

Methodology: PBMT vs. NMT

The study evaluates two distinct paradigms of machine translation to determine their efficacy in diacritic restoration:

  1. Phrase-Based Machine Translation (PBMT): Utilizing the Moses toolkit, this statistical approach segments sentences into phrases and employs a "noisy channel model" to identify the most probable diacritic sequence. It leverages a 3-gram language model and word alignment via GIZA++ to maintain structural integrity.
  2. Neural Machine Translation (NMT): Using the OpenNMT framework, the researchers implemented a sequence-to-sequence (seq2seq) model. This architecture uses an encoder to compress the source sentence into a fixed-length vector and a decoder to generate the target diacritic text. This study represents one of the first applications of NMT to the specific problem of Vietnamese diacritic restoration.

Experimental Framework

To train and evaluate these models, the authors constructed a parallel corpus by scraping approximately 10,000 news articles from the web. Diacritics were programmatically stripped from the original text to create "source" and "target" pairs. The resulting dataset comprised 140,474 sentence pairs for training, with approximately 17,500 pairs reserved for both development and testing.

Results and Comparative Analysis

The experimental results reveal a clear trade-off between raw accuracy and computational efficiency. The Phrase-Based (Moses) approach currently holds the lead in accuracy, while the Neural-Based (OpenNMT) approach offers superior speed.

Table 2: Comparison of Accuracy and BLEU scores between Phrase-based and Neural-based translation models.

While PBMT achieved a higher accuracy of 97.32%, the NMT model demonstrated significant advantages in operational performance. The NMT model was twice as fast during inference, processing 22 sentences per second compared to the PBMT model's 10 sentences per second. Furthermore, the NMT model required less training time (8 hours versus 12 hours for PBMT).

The researchers attribute the PBMT model's higher accuracy to the dataset size. Neural models typically require millions of examples to reach peak performance, and the 140,000 pairs used here may not have been sufficient for the NMT model to fully generalize. Additionally, the NMT implementation did not utilize pre-trained word embeddings, which are standard in modern NLP for capturing deeper semantic relationships.

Conclusion and Future Directions

Treating diacritic restoration as a translation task allows researchers to leverage highly optimized MT toolkits. While statistical phrase-based methods remain the accuracy benchmark for smaller datasets, neural approaches offer a compelling path forward due to their inference speed and potential for improvement with larger corpora. Future work will focus on scaling the training data and incorporating pre-trained Vietnamese word embeddings to bridge the accuracy gap, potentially leading to hybrid models that combine the reliability of PBMT with the efficiency of NMT.

Summary updated

BibTeX
@inproceedings{pham2017use,
  author = {Thai-Hoang Pham and Xuan-Khoai Pham and Phuong Le-Hong},
  title = {{On the Use of Machine Translation-Based Approaches for Vietnamese Diacritic Restoration}},
  booktitle = {IALP},
  year = {2017},
  url = {https://openreview.net/forum?id=nzQGgMfFsw},
}
Figure