Restoring Hebrew Diacritics Without a Dictionary

Elazar Gershuni, Yuval Pinter

Abstract

Modern Hebrew is typically written in an "undotted" script, omitting the diacritic marks (niqqud) that represent vowels and certain consonantal distinctions. This lack of phonetic information creates significant hurdles for language learners, accessibility tools, and NLP systems. We introduce Nakdimon, a lightweight, character-level Bi-LSTM model that restores Hebrew diacritics with state-of-the-art accuracy. Unlike existing "heavy" systems that rely on massive, hand-crafted dictionaries and morphological analyzers, Nakdimon treats diacritization as a simple sequence labeling task. By training on a newly curated diverse dataset of modern Hebrew, Nakdimon performs on par with complex commercial systems while remaining significantly easier to integrate and maintain.

Introduction

While native Hebrew speakers use linguistic context to disambiguate undotted text, the absence of niqqud is a major barrier for non-native speakers and automated text-to-speech (TTS) systems. Traditional solutions for diacritic restoration are often proprietary "black boxes" built upon extensive morphological rules and dictionaries. These systems struggle with out-of-vocabulary (OOV) terms, such as foreign names or modern slang, and are difficult to adapt to new domains. Nakdimon addresses these issues by adopting a purely data-driven, character-level approach.

Methods

Nakdimon simplifies diacritization into a character-level sequence tagging task using a two-layer Bidirectional LSTM (Bi-LSTM) architecture. For every character in an undotted input sequence, the model independently predicts three labels:

  1. Shin/Sin dot: Distinguishes between the /s/ and /sh/ sounds.
  2. Dagesh/Mappiq: A central dot affecting pronunciation (e.g., /p/ vs /f/).
  3. Vowel mark: Represents the specific vowel sound.

Crucially, Nakdimon uses no external linguistic resources—no dictionaries, no morphological engines, and no complex decoding algorithms. It makes greedy, character-level decisions, making it highly efficient and robust to non-standard vocabulary.

Datasets

The researchers emphasize that high-quality, diverse data is central to the model's success. They utilized a combination of historical texts, automatically diacritized short stories, and a newly curated modern dataset.

Composition of the modern Hebrew dataset used for training and evaluation.

The modern dataset (detailed in the figure above) includes approximately 326,000 tokens from diverse sources such as Wikipedia, news outlets, government websites, and blogs. This variety ensures the model learns patterns across different registers of modern Hebrew, from formal official documents to informal user-generated content.

Key Results

Nakdimon was evaluated against the current state-of-the-art system (Dicta) and a popular commercial engine (Morfix) using a new, diverse test set.

Performance comparison of Nakdimon against baseline and state-of-the-art systems.

As shown in the results table, Nakdimon achieved a Decision Accuracy (DEC) of 97.91%, nearly matching Dicta's 97.95%. While its Word Accuracy (WOR) of 89.75% is slightly lower than Dicta's dictionary-backed 94.11%, Nakdimon significantly outperforms other systems and demonstrates remarkable robustness. A key insight is the model's high Vocalization Accuracy (VOC), which measures errors that actually affect pronunciation for a modern speaker.

Discussion and Conclusion

Nakdimon demonstrates that a relatively simple neural architecture can match the performance of complex, rule-based systems when provided with high-quality, diverse training data. Its character-level approach makes it particularly adept at handling foreign words (e.g., "iPhone") and slang that often trip up dictionary-based systems.

While Nakdimon shows slightly lower performance on "true" OOV words compared to systems that can infer roots, its lightweight nature and lack of external dependencies make it an ideal candidate for integration into broader NLP pipelines, such as machine translation or speech generation. Future work will explore the integration of Nakdimon as a feature provider to enhance downstream tasks requiring explicit phonetic information.

Summary updated

BibTeX
@inproceedings{gershuni2022restoring,
  author = {Elazar Gershuni and Yuval Pinter},
  title = {{Restoring Hebrew Diacritics Without a Dictionary}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-naacl.75},
}
Figure