Downloads · 30 days
0
alakxender/dhivehi-T5-tokenizer-extended
dhivehi-T5-tokenizer-extended is a machine learning model from alakxender. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This tokenizer extends google/flan-t5-base to support Dhivehi (Thaana script) characters, while preserving English subword tokenization.
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2025
Repo size
131 B
Likes
0
Public
Click a slice to open those files.
.json2.5 MB · 100%
From the Hugging Face model README
This tokenizer extends google/flan-t5-base to support Dhivehi (Thaana script) characters, while preserving English subword tokenization.
google/flan-t5-base_This, _is, etc.)from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("alakxender/dhivehi-T5-tokenizer-extended")
# Dhivehi example
text = "ހެނބަދޫ މުދިންބެ: ކުދިން ހަތިމްކުރާ ކޮންމެ ފަހަރަކު ލޮލުން ކަރުނަ!"
tokens = tokenizer.tokenize(text)
print(tokens)
| Feature | Stock Flan-T5 Tokenizer | Extended Dhivehi Tokenizer |
|---|---|---|
| Dhivehi support | ❌ Uses <unk> | Proper tokenization |
| English tokenization | ✅ Yes | Preserved |
| Added tokens | ❌ No | Thaana characters |
The stock flan-t5-base tokenizer does not support Dhivehi text properly:
from transformers import AutoTokenizer
stock_tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
tokens = stock_tokenizer.tokenize("ހެނބަދޫ މުދިންބެ: ކުދިން ހަތިމްކުރާ ކޮންމެ ފަހަރަކު ލޮލުން ކަރުނަ!")
print(tokens)
# Output: ['<unk>', '<unk>']
In contrast, the extended tokenizer will tokenize Thaana characters individually or as learned units, preserving semantics and avoiding <unk> tokens.