> 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.

# Type Alias: HomophoneDetection

> **HomophoneDetection** = `"context-local"` | `"dictionary-wide"`

Selects how the homophone marker decides that a reading needs its hanja shown
in `rendering: "hangul-only"`.  Corresponds to Rust `HomophoneDetection`.

- `"context-local"` — Gloss a reading only when a different-meaning homophone
  actually appears within the [ContextWindow](https://canary.gukhanmun.org/api/js/types/_gukhanmun_napi.ContextWindow.md).  This keeps hangul-only
  output clean and is the default.
- `"dictionary-wide"` — Also gloss readings shared by other hanja forms
  anywhere in the dictionary, even when no homophone appears in the text.
  With a large reference dictionary this glosses most Sino-Korean words; words
  that should always be glossed are better expressed with `requireHanja`.
