DEV Community

Dostonbek
Dostonbek

Posted on

I Built a 32,000-Word Uzbek Dictionary and Never Checked If It Was Actually What I Claimed It Was

A while back I compiled a list of Uzbek words pulling from a couple of existing community word lists and filtering down to what I documented as “nouns only.” I never went back and actually verified that claim, or done anything useful with the list beyond having it sit in a repo. Revisiting it: the “nouns only” claim doesn’t hold up, and once I fixed my understanding of what’s actually in the list, I used it to build and evaluate a small spell-checker something Uzbek, as a lower-resource language for NLP tooling, doesn’t have much of publicly.

Auditing my own claim
The list has 31,993 entries (31,918 unique 75 duplicates I hadn’t caught either). I described it as containing only nouns. Checking that by looking at common word endings:

Ending Count What it actually marks -moq 3,871 (12.1%) Verb infinitive e.g. adashmoq ("to get lost"), ajratmoq ("to separate") -lik 2,478 (7.7%) Noun-forming suffix e.g. abadiylik ("eternity") consistent with the claim -chi 965 (3.0%) Agent-noun suffix e.g. temirchi-style ("-er/-ist") consistent

12.1% of a list I documented as “nouns only” are verb infinitives, not nouns. Spot-checking a sample of the -moq entries confirms it these are unambiguously verbs (ajratmoq, avaylamoq, ajablanmoq), not nouns that happen to end similarly. I hadn't caught this because I never checked the finished list against its own stated scope I built the filter, assumed it worked, and moved on. It's a small thing to get wrong, but it's exactly the kind of gap that matters if anyone downstream (including me, later) relies on the "nouns only" label being accurate.

**Building something with it: a spell-checker
**Uzbek doesn’t have the density of public NLP tooling that English does no ubiquitous spell-checker API, limited autocomplete support in most editors. With a real (if imperfectly labeled) 32,000-word vocabulary in hand, I built a simple fuzzy-matching spell-checker: given a misspelled word, return the closest matches from the vocabulary by string similarity.

Evaluating it properly
Rather than testing on a handful of words I picked by hand, I generated a proper test set: 200 words sampled randomly from the vocabulary, each given one random realistic typo (a letter swap, deletion, insertion, or substitution — the same error types people actually make typing). Then I checked whether the corrector’s suggestions included the original correct word.

Approach Top-1 accuracy Top-5 accuracy Random baseline (5 random words) 0.0% 0.0% Same-length words only, alphabetical 0.0% 0.0% Fuzzy string matching (this tool) 87.5% 99.0%

87.5% of the time, the single top suggestion is the exact word the person meant to type. 99% of the time, it’s somewhere in the top 5. Average lookup time was 2.6 milliseconds against the full 32,000-word vocabulary fast enough to run live as someone types, not just as a batch job.

Where this still falls short
Typos were synthetically generated, not collected from real Uzbek typing mistakes real-world typo patterns (e.g., mistakes specific to a keyboard layout, or confusion between Uzbek’s special characters like oʻ and gʻ and their Latin lookalikes) may behave differently than the single-random-edit typos I simulated.
The vocabulary itself still has the mislabeling problem the tool will happily “correct” a misspelled verb toward another verb, which is fine for spell-checking but means the list still shouldn’t be trusted as a noun-only resource for anything that depends on that distinction (like part-of-speech tagging).
No frequency weighting the corrector treats a rare, obscure word exactly the same as a common one when ranking suggestions, which a production spell-checker normally wouldn’t do.

Why this was worth doing
It would’ve been easy to leave the word list exactly as it was undocumented duplicates, an inaccurate scope claim, sitting unused. Auditing my own earlier claim instead of just trusting it, and then actually building something functional and measured on top of the corrected understanding, is the same habit as the last few projects: don’t report a number (or a claim) without checking it first.

Code
Word list, audit script, and spell-checker with evaluation: Github[github.com/DostonUr/uzwords_2]

If you work with Uzbek or another lower-resource language and have run into similar tooling gaps, I’d like to hear about it reply here or find me on LinkedIn[https://www.linkedin.com/in/doston-urinov].

Top comments (0)