For AI agents: the complete documentation index is available at https://canary.gukhanmun.org/llms.txt, the full documentation bundle is available at https://canary.gukhanmun.org/llms-full.txt, and this page is available as Markdown at https://canary.gukhanmun.org/guide/intro.md.

Introduction

Gukhanmun is a hanja-to-hangul converter for Korean text. Given mixed-script input containing hanja (漢字) alongside hangul, it produces hangul-only output or annotated output in several formats: plain text, Markdown, and HTML (including <ruby> markup).

The converter supports the Standard Korean Dictionary (標準國語大辭典), Open Korean Dictionary and NIKL loanword spelling examples. Rust and the CLI bundle dictionaries; JavaScript and Python load them explicitly. It supports South Korean (ko-kr) and North Korean (ko-kp) orthography presets, configurable segmentation, numeral handling, homophone disambiguation, and per-character annotation directives.

Choosing an interface

InterfaceWhen to use
CLIConvert files from the terminal or in shell pipelines
RustEmbed the converter in a Rust application or library
JavaScriptUse from Node.js, Deno, Bun, or a browser
PythonConvert text in Python NLP and document-processing pipelines

CLI

The gukhanmun command-line tool reads from files or standard input and writes to standard output or a file. It auto-detects the format from the file extension (.html, .md) and supports all conversion options via flags.

Start here: Installation.

The standalone packages are @gukhanmun/cli on npm and gukhanmun-cli on PyPI. They install both gukhanmun and gukhanmun-mkdict, not a library API.

Rust

The gukhanmun crate exposes a Builder/Converter API. Build a converter once, reuse it across calls, and stream output token by token if needed. Feature flags let you trim the binary size by disabling HTML, Markdown, or the bundled dictionary.

Start here: Installation.

JavaScript

Two packages cover different environments:

  • @gukhanmun/wasm runs in any JavaScript runtime via WebAssembly. Use it in browsers, serverless functions, or anywhere native addons are not available.
  • @gukhanmun/napi is a native Node.js addon with higher throughput. It supports Node.js 20+, Deno 2.0+, and Bun 1.0+.

Both share the same load() API and accept identical options.

Start here: Installation.

Python

The Python package provides a reusable Converter(...) with typed keyword options and explicit dictionary sources. Install from PyPI, then convert plain text, HTML or Markdown in the same process.

Start here: Installation.