Open Korean Dictionary
gukhanmun-opendict bundles category snapshots derived from the National
Institute of Korean Language's Open Korean Dictionary (우리말샘) JSON
download.
The source dump is not committed to this repository. The committed source of
truth is the four canonical TSV files under
crates/gukhanmun-opendict/data/, split by the source senseinfo.type value:
general (一般語), North Korean (北韓語), dialect (方言), and archaic (옛말).
Snapshot
Regeneration
Place the downloaded zip or extracted shard directory wherever convenient, then run:
The extractor accepts a single JSON file, the official zip archive, or a directory of JSON shards. Directory entries and zip members are processed in lexicographic order. Each category TSV is deterministic UTF-8 sorted by dictionary key.
The gukhanmun-opendict build script invokes gukhanmun-mkdict to build four
embedded FST dictionaries at compile time. The JavaScript package data tasks
build matching FST and CDB binaries for @gukhanmun/opendict-fst and
@gukhanmun/opendict-cdb.
Extraction policy
Only entries whose word_unit is 어휘 and whose original_language_info can
produce at least one hanja-bearing lookup key are included. The dictionary
reading comes from wordinfo.word; homograph numbers, hyphens, and ^
separators are removed from the word form.
The extractor reuses the shared key construction logic used by
gukhanmun-stdict. Native hanja segments are copied as lookup keys, native
Korean segments may appear around hanja segments, bracketed foreign hanja
spellings such as Beijing[北京] are kept, and foreign-origin segments without
hanja are skipped. Single-hanja foreign readings are skipped so they cannot
shadow Sino-Korean fallback readings recovered from unihan.
Duplicate keys are resolved within each category only: the first reading
encountered in sorted dump shard order wins for that category. This keeps the
general (一般語) and North Korean (北韓語) readings independent, so a caller
can place the North Korean dictionary above another dictionary in a
ChainDictionary without changing the South Korean general snapshot.
Runtime use
The Rust crate exposes one loader per category:
gukhanmun_opendict::general()gukhanmun_opendict::north_korean()gukhanmun_opendict::dialect()gukhanmun_opendict::archaic()
Preset::KoKp includes the North Korean (北韓語) dictionary by default in Rust
and the CLI. The JavaScript bindings do not auto-load dictionary data for
either preset; use @gukhanmun/opendict-fst or @gukhanmun/opendict-cdb
explicitly and pass the categories you need through
load({ dictionaries: [...] }).