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/api/js/interfaces/_gukhanmun_types.DictionaryEntry.md.

Interface: DictionaryEntry

A single dictionary entry: a hanja key with one hangul reading.

Callers pass these in MapDictionarySource.entries to build a dictionary at runtime. Fields mirror the Rust ReadingCandidate type plus the hanja key.

Properties

hanja

readonly hanja: string

The hanja form (dictionary key), e.g. "漢字".


preference?

readonly optional preference?: number

Relative default preference for this reading within its hanja key, a non-negative integer. Larger values win, so an entry listed twice with different preferences keeps competing readings and uses the higher one by default. Absent means 0.

List order never selects the default: when two readings share a preference the tie is broken by reading spelling. Set distinct preferences to choose a default deliberately.

Corresponds to Rust ReadingCandidate::preference.


reading

readonly reading: string

The word-initial hangul reading, e.g. "한자".


requireHangul?

readonly optional requireHangul?: boolean

When true, the renderer should always show a hangul gloss alongside the original hanja (used with rendering: "original").

Corresponds to Rust MatchMark::require_hangul.


requireHanja?

readonly optional requireHanja?: boolean

When true, the renderer should always show the original hanja alongside the hangul reading, regardless of ambiguity.

Corresponds to Rust MatchMark::require_hanja.


suffixReading?

readonly optional suffixReading?: string

The reading used when the match is not word-initial, when it differs from reading. For example a 年代 entry with reading: "연대" and suffixReading: "년대" reads 1990年代 as 1990년대 but 年代 alone as 연대.

Corresponds to Rust ReadingCandidate::suffix_reading.