Metadata-Version: 2.5
Name: gukhanmun-stdict-cdb
Version: 0.4.0.dev323
Summary: Standard Korean Language Dictionary CDB data for the gukhanmun Python package
Project-URL: Homepage, https://gukhanmun.org/
Project-URL: Repository, https://github.com/dahlia/gukhanmun
Project-URL: Issues, https://github.com/dahlia/gukhanmun/issues
Author-email: Hong Minhee <hong@minhee.org>
License-Expression: GPL-3.0-only AND LicenseRef-CC-BY-SA-2.0-KR
License-File: ATTRIBUTION.md
License-File: LICENSE
Keywords: cdb,dictionary,hangul,hanja,korean
Classifier: Natural Language :: Korean
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.11
Description-Content-Type: text/markdown

gukhanmun-stdict-cdb
====================

This distribution contains *Standard Korean Language Dictionary*
(標準國語大辭典) compiled into Gukhanmun CDB dictionary binaries
(*stdict.cdb.gz*) for the [gukhanmun] Python package. It has no API of its own
and does not depend on `gukhanmun`.

[gukhanmun]: https://github.com/dahlia/gukhanmun


Installation
------------

Install it through the matching extra of the core package:

~~~~ sh
pip install 'gukhanmun[stdict-cdb]'
~~~~


Usage
-----

Installing the data does not change any converter. Add it explicitly:

~~~~ python
from gukhanmun import Converter, DictionaryFormat
from gukhanmun.dictionaries import stdict

converter = Converter(dictionaries=[
    stdict(format=DictionaryFormat.CDB),
])
~~~~

Resources ending in *.gz* are gzip-compressed; the `gukhanmun.dictionaries`
helpers decompress them, while direct resource access returns the compressed
bytes.

To read a resource directly, use `importlib.resources`:

~~~~ python
from importlib.resources import files

data = (files("gukhanmun_stdict_cdb") / "stdict.cdb.gz").read_bytes()
~~~~


License
-------

`GPL-3.0-only AND LicenseRef-CC-BY-SA-2.0-KR`. See *LICENSE* and
*ATTRIBUTION.md* for the code license and the data attribution.
*provenance.json* records the source snapshot and the hashes of the bundled
files.
