Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

567 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dictionaries

Collection of normalized hunspell dictionaries, used by Codebook.

This is a fork of wooorm/dictionaries that replaces the original JavaScript/npm pipeline with a Rust tool, strips the output down to the raw hunspell files (index.aff, index.dic, license), and validates every dictionary with spellbook — the spell checker Codebook uses internally — so anything checked in here is known to load.

Layout

Each dictionary lives at dictionaries/<BCP-47 code>/:

  • index.aff — affix file (UTF-8, SET UTF-8)
  • index.dic — word list (UTF-8)
  • license — the upstream license file, when the source ships one

Building

The pipeline is one Rust binary with subcommands:

cargo run --release -- crawl      # download + extract upstream sources (archive/, source/)
cargo run --release -- build      # make/configure for sources that build their files
cargo run --release -- generate   # decode, normalize, patch, write dictionaries/
cargo run --release -- readme     # regenerate the tables in this readme
cargo run --release -- validate   # parse every dictionary with spellbook
cargo run --release -- all        # all of the above, in order

Every subcommand accepts a repeatable --only <code> filter, e.g. cargo run -- all --only uk. A Makefile wraps the common invocations — run make help for the list.

Notes:

  • validate works offline against the checked-in dictionaries — no crawl needed. Run it after any change.
  • crawl caches downloads in archive/ and extractions in source/ (both gitignored). Delete an entry to re-fetch it.
  • build shells out to make for six sources that don't ship ready-made hunspell files (de, el, gd, nds, rw, he). Host prerequisites: make and perl, plus the ispell and hunspell CLIs for de (brew install ispell hunspell), and a C toolchain for he.
  • patch --only <code> applies registered patches to already-generated dictionaries in place, for adding a patch without re-crawling. Patches fail loudly when their target text is absent, so they can't double-apply.
  • Upstream URLs, paths, and encodings live in src/table.rs, ported from upstream's script/crawl.sh with the original provenance comments.

Fork modifications

Some dictionaries are modified after normalization, before writing. The patches live in src/patches.rs; each asserts the exact upstream text it expects and fails the build when upstream changes, so this list (generated from the patch registry) is always current:

  • uk: remove ICONV rules that mapped every Latin letter to the digit 0, which made hunspell silently accept all Latin-script words as numbers
  • da: escape / in three slash-containing entries (quoting is not valid dic syntax) and fix a corrupted FedEx/Fedkrog line
  • el-polyton: replace a tab with a space inside a REP rule (hunspell treats the tab as a field separator, breaking the rule)
  • br: fix three entries flagged m01 — with FLAG long that is one-and-a-half flags; the defined flag m0 is meant
  • gl: fix a corrupted numeric flag 2iñer30 (stray text spliced into 230, the present-tense suffix flag) on the entry for tumbar
  • hy: fix the SFX VD block header declaring 171 rules when 172 follow
  • ia: remove a doubled closing bracket ([oiyu]]) from seven PFX conditions
  • la: fix two affix rules misspelled SFK instead of SFX, which also broke the surrounding block's declared rule count
  • mn: remove the COMPOUNDRULE block — its [a0,a1,...] alternation syntax is not valid hunspell and no parser accepts it
  • ne: strip a stray X from 171 numeric continuation flags (17X17); the X-less flags are the ones actually defined, matching hunspell's lenient numeric parsing; also fix three corrupted entries (a slash inside a word, a stray I in a flag list, and two lines merged into one)
  • sa: clean up stray carriage returns inside lines: repair dic entries and affix rules where a CR is glued onto a word, and drop single-rule affix blocks whose rule has a bare CR as a whole field (dead rules hunspell could never match)
  • tr: renumber affix flag 0 to 9999 — hunspell numeric flags are defined as 1–65000 and flag 0 is rejected by spellbook

List of dictionaries

👉 Note: preferred BCP-47 codes are used (according to Unicode CLDR). To illustrate, as American English and Brazilian Portuguese are the most common types of English and Portuguese respectively, they get the codes en and pt.

In total 94 dictionaries are provided.

Code Language License Source
bg Bulgarian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) bgoffice.sourceforge.net
br Breton (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) Drouizig/hunspell-br
ca Catalan (GPL-2.0 OR LGPL-2.1) Softcatala/catalan-dict-tools
ca-valencia Catalan (Valencia) (GPL-2.0 OR LGPL-2.1) Softcatala/catalan-dict-tools
cs Czech GPL-2.0 translatoblog.cz
cy Welsh LGPL-3.0 techiaith/hunspell-cy
da Danish (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) stavekontrolden.dk
de German (GPL-2.0 OR GPL-3.0) j3e.de
de-AT German (Austria) (GPL-2.0 OR GPL-3.0) j3e.de
de-CH German (Switzerland) (GPL-2.0 OR GPL-3.0) j3e.de
el Greek (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) stevestavropoulos/elspell
el-polyton Greek (Polyton) GPL-3.0 thepolytonicproject.gr
en English (MIT AND BSD) wordlist.aspell.net
en-AU English (Australia) (MIT AND BSD) wordlist.aspell.net
en-CA English (Canada) (MIT AND BSD) wordlist.aspell.net
en-GB English (United Kingdom) (MIT AND BSD) wordlist.aspell.net
en-ZA English (South Africa) LGPL-2.1 extensions.openoffice.org
eo Esperanto GPL-2.0 esperantilo.org
es Spanish (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-AR Spanish (Argentina) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-BO Spanish (Bolivia) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-CL Spanish (Chile) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-CO Spanish (Colombia) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-CR Spanish (Costa Rica) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-CU Spanish (Cuba) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-DO Spanish (Dominican Republic) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-EC Spanish (Ecuador) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-GT Spanish (Guatemala) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-HN Spanish (Honduras) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-MX Spanish (Mexico) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-NI Spanish (Nicaragua) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-PA Spanish (Panama) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-PE Spanish (Peru) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-PH Spanish (Philippines) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-PR Spanish (Puerto Rico) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-PY Spanish (Paraguay) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-SV Spanish (El Salvador) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-US Spanish (United States of America) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-UY Spanish (Uruguay) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
es-VE Spanish (Venezuela) (GPL-3.0 OR LGPL-3.0 OR MPL-1.1) sbosio/rla-es
et Estonian LGPL-2.1 meso.ee
eu Basque GPL-2.0 xuxen.eus
fa Persian Apache-2.0 b00f/lilak
fo Faroese (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) (frozen — upstream gone)
fr French MPL-2.0 grammalecte.net
fur Friulian GPL-2.0 (frozen — upstream gone)
fy Western Frisian GPL-3.0 PanderMusubi/frisian
ga Irish GPL-2.0 kscanne/gaelspell
gd Scottish Gaelic GPL-3.0 kscanne/hunspell-gd
gl Galician GPL-3.0 meixome/hunspell-gl
grc Ancient Greek GPL-3.0 mrakia/hunspell-ancient-greek
he Hebrew AGPL-3.0 hspell.ivrix.org.il
hr Croatian (LGPL-2.1 OR SISSL) krunose/hunspell-hr
hu Hungarian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) laszlonemeth/magyarispell
hy Armenian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) (frozen — upstream gone)
hyw Western Armenian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) (frozen — upstream gone)
ia Interlingua GPL-3.0 addons.thunderbird.net
ie Interlingue Apache-2.0 Carmina16/hunspell-ie
is Icelandic CC-BY-SA-3.0 LibreOffice/dictionaries
it Italian GPL-3.0 (frozen — upstream gone)
ka Georgian MIT gamag/ka_GE.spell
ko Korean (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) spellcheck-ko/hunspell-dict-ko
la Latin GPL-2.0 extensions.openoffice.org
lb Luxembourgish EUPL-1.1 spellchecker-lu/dictionary-lb-lu
lt Lithuanian BSD-3-Clause ispell-lt/ispell-lt
ltg Latgalian LGPL-2.1 dict.dv.lv
lv Latvian LGPL-2.1 dict.dv.lv
mk Macedonian GPL-3.0 (frozen — upstream gone)
mn Mongolian LPPL-1.3c bataak/dict-mn
nb Norwegian Bokmål GPL-2.0 no.speling.org
nds Low German GPL-3.0 tdf/dict_nds
ne Nepali LGPL-2.1 ltk.org.np
nl Dutch (BSD-3-Clause OR CC-BY-3.0) OpenTaal/opentaal-hunspell
nn Norwegian Nynorsk GPL-2.0 no.speling.org
oc Occitan GPL-2.0 gl:taissou/hunspell-files-for-occitan-lengadocian
pl Polish (GPL-3.0 OR LGPL-3.0 OR MPL-2.0) extensions.openoffice.org
pt Portuguese (LGPL-3.0 OR MPL-2.0) LibreOffice/dictionaries
pt-PT Portuguese (Portugal) (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) natura.di.uminho.pt
ro Romanian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) rospell.wordpress.com
ru Russian BSD-3-Clause LibreOffice/dictionaries
rw Kinyarwanda GPL-3.0 kscanne/hunspell-rw
sa Sanskrit GPL-2.0 Shreeshrii/hindi-hunspell
sk Slovak (GPL-2.0 OR LGPL-2.1 OR MPL-1.1) sk-spell.sk.cx
sl Slovenian (GPL-3.0 OR LGPL-2.1) extensions.libreoffice.org
sr Serbian (GPL-2.0 OR LGPL-2.1 OR MPL-1.1 OR CC-BY-SA-3.0) grakic/hunspell-sr
sr-Latn Serbian (Latin script) (GPL-2.0 OR LGPL-2.1 OR MPL-1.1 OR CC-BY-SA-3.0) grakic/hunspell-sr
sv Swedish LGPL-3.0 extensions.libreoffice.org
sv-FI Swedish (Finland) LGPL-3.0 extensions.libreoffice.org
tk Turkmen Apache-2.0 nazartm/turkmen-spell-check-dictionary
tlh Klingon Apache-2.0 PanderMusubi/klingon
tlh-Latn Klingon (Latin script) Apache-2.0 PanderMusubi/klingon
tr Turkish MIT extensions.openoffice.org
uk Ukrainian GPL-3.0 brown-uk/dict_uk
vi Vietnamese GPL-2.0 1ec5/hunspell-vi

License

The build tool is MIT licensed (© Titus Wormer for the original pipeline this is derived from). Each dictionary keeps its own upstream license — see the table above and the license file in each dictionary directory.

About

Hunspell dictionaries in UTF-8

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages