MoVoC-Tok: Morphology-Aware Subword Tokenizers for Ge'ez-Script Languages

MoVoC-Tok is a constrained-merge BPE tokenizer: during BPE training, no merge is permitted to cross a morpheme boundary. It accompanies MoVoC: Morphology-Aware Subword Construction for Ge'ez Script Languages (Findings of EMNLP 2025).

This repository contains the 32,000-vocabulary tokenizers for Amharic and Tigrinya β€” the checkpoints used in the published experiments.

Training objective

max_V  Ξ£_i log P(BPE(w_i; V, M_i))
subject to: no subword s_j crosses a morpheme boundary in M_i

Usage

Nothing needs to be downloaded by hand. The files are fetched on first use and cached under ~/.cache/huggingface/.

from transformers import AutoTokenizer

tok = AutoTokenizer.from_pretrained("Hailay/MoVoC-Tok", subfolder="amharic")
print(tok.tokenize("αŠ αˆαˆ°α‰ αˆ©αˆ"))   # ['β–αŠ αˆ', 'αˆ°α‰ ', 'ሩም']

tok_ti = AutoTokenizer.from_pretrained("Hailay/MoVoC-Tok", subfolder="tigrinya")
print(tok_ti.tokenize("αŠ£α‹­α‰΅αŠ¨α‹αŠ•αŠ•"))  # ['β–αŠ£α‹­α‰΅', 'αŠ¨α‹αŠ•αŠ•']

subfolder is required

This repository holds two tokenizers, one per language, so there is nothing at the repository root to load. Omitting subfolder fails:

AutoTokenizer.from_pretrained("Hailay/MoVoC-Tok")
# ValueError: Unrecognized model in Hailay/MoVoC-Tok.
# Should have a `model_type` key in its config.json ...

The error mentions model_type because AutoTokenizer looks for a model config.json at the path it is given in order to decide which tokenizer class to build. There is no file at the root, so the lookup fails before any tokenizer is read. Pass subfolder="amharic" or subfolder="tigrinya".

Note that the config.json inside each language directory is not a transformers model config β€” it records the MoVoC-Tok training settings (vocab_size, merge_operations, and so on). The tokenizer itself is defined by tokenizer.json and tokenizer_config.json, which is why loading works with subfolder even though these files carry no model_type.

Specifying the class directly works as well, and skips the config lookup entirely:

from transformers import PreTrainedTokenizerFast

tok = PreTrainedTokenizerFast.from_pretrained(
    "Hailay/MoVoC-Tok", subfolder="amharic")

Reproducing published results

Pin a revision so you get byte-identical files regardless of later updates:

tok = AutoTokenizer.from_pretrained(
    "Hailay/MoVoC-Tok",
    subfolder="amharic",
    revision="a4dfa487a40c9a9972598fb48d54067f338add72",
)

Offline or air-gapped use

Fetch once on a connected machine, then run with the cache:

from huggingface_hub import snapshot_download
snapshot_download("Hailay/MoVoC-Tok")       # populates ~/.cache/huggingface
export HF_HUB_OFFLINE=1                      # then load as usual

To place the files in a directory of your choosing instead:

hf download Hailay/MoVoC-Tok --local-dir ./movoc-tok
tok = AutoTokenizer.from_pretrained("./movoc-tok/amharic")   # local path, no subfolder

Contents

Path Description
amharic/ MoVoC-Tok Amharic, 32k (PreTrainedTokenizerFast)
tigrinya/ MoVoC-Tok Tigrinya, 32k (PreTrainedTokenizerFast)
vocabulary/movoc_vocab.txt MoVoC vocabulary, 105,310 tokens
vocabulary/movoc_statistics.json Vocabulary composition
vocabulary/vocabulary_report.md Algorithm 1 derivation
movoc_tok_report.md Training report and implementation notes

Each language directory also carries config.json and training_config.json recording the exact training settings.

Training details

Amharic Tigrinya
Corpus NLLB.am-en.am NLLB.en-ti.ti
Corpus lines read 400,000 400,000
Word types (min freq 2) 158,504 169,373
Alphabet size 1,041 1,156
Vocabulary size 32,000 32,000
BPE merges 30,955 30,840
Boundary-crossing merges rejected 335,638 104,964
Words with morpheme boundaries 4,439 2,291
Training time 12.6 min 13.9 min

Exported vocabulary size is 32,001 (32,000 plus one added token). Constrained BPE is deterministic; no random seed is involved.

The MoVoC vocabulary

vocabulary/movoc_vocab.txt is the MoVoC vocabulary built by Algorithm 1 (s = 224,000, r = 5/7), separate from the two tokenizers above:

Component Count
Amharic BPE 32,000
Tigrinya BPE 32,000
Amharic morphemes 44,104
Tigrinya morphemes 8,793
Contributed before dedup 116,897
Duplicates removed βˆ’11,587
Final vocabulary 105,310

The morpheme budget was not filled: 35,896 Amharic and 71,207 Tigrinya slots went unused because fewer unique morphemes were available than the 80,000 per-language target.

Implementation notes

Two points materially affect the output and are documented in movoc_tok_report.md:

  1. Surface boundary projection. HornMorpho returns citation forms, which generally do not concatenate to the surface word. Boundaries are projected onto the surface by left-to-right alignment with a longest-contiguous-block fallback. Words whose boundaries cannot be projected contribute no constraint β€” no boundary is invented.
  2. Encoding-time constraint enforcement. Training-time restriction alone is insufficient: a merge learned as legal in one word may straddle a boundary in another. With training-time constraints only, boundary compliance measured 69.05%; re-applying the per-word constraint at encoding time raises it to 100%.

Scope

  • Tokenizers are released for Amharic and Tigrinya only. Ge'ez and Tigre are evaluation-only in the paper and have no MoVoC-Tok checkpoint.
  • These are the 32k published checkpoints. Separate 63,050-vocabulary checkpoints exist for MT work; the Tigrinya one matches the MT model's vocabulary, while the Amharic one was trained after publication and is not part of the published experiments. Neither is included here.

Citation

@inproceedings{teklehaymanot-etal-2025-movoc,
    title     = {{M}o{V}o{C}: Morphology-Aware Subword Construction for {G}e'ez Script Languages},
    author    = {Teklehaymanot, Hailay Kidu and Fazlija, Dren and Nejdl, Wolfgang},
    booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2025},
    year      = {2025},
    pages     = {13131--13144},
    url       = {https://aclanthology.org/2025.findings-emnlp.706/}
}

License

CC-BY-4.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support