#[non_exhaustive]pub struct ConversionOptions {
pub rendering: RenderOptions,
pub engine: EngineOptions,
pub homophone_window: ContextWindow,
pub homophone_detection: HomophoneDetection,
pub first_occurrence_window: ContextWindow,
pub collapse_redundant_parens: bool,
pub recovery: Recovery,
}Expand description
Consolidated option bag carried through the umbrella facade.
ConversionOptions is #[non_exhaustive] so additional knobs can be added
without a breaking change. Construct it through Preset::options and
adjust individual fields, or use the Builder helpers
that mutate it for you.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rendering: RenderOptionsHow annotations are turned into concrete text or markup.
engine: EngineOptionsOptions forwarded to the conversion engine (segmentation, initial sound law, numeral strategy).
homophone_window: ContextWindowContext window over which homophone disambiguation is computed.
homophone_detection: HomophoneDetectionStrategy that decides which dictionary readings are treated as
homophones needing a parenthesized hanja gloss in
RenderMode::HangulOnly.
Defaults to HomophoneDetection::ContextLocal, which glosses a word
only when a different-meaning homophone actually appears within the
homophone_window. Switch to
HomophoneDetection::DictionaryWide to also gloss readings shared by
other entries anywhere in the dictionary.
first_occurrence_window: ContextWindowContext window for clearing repeated require_hanja /
require_hangul flags after the first occurrence of each hanja form.
collapse_redundant_parens: boolWhether redundant parenthetical reading annotations are collapsed.
When enabled (the default), an explicit gloss such as 庫間(곳간) or
곳간(庫間) is recognised, the redundant parenthetical text is removed,
and the surviving annotation is marked to show both scripts in every
render mode. A parenthetical that pins an alternative reading (for
example 數字(수자)) overrides the dictionary reading for that
occurrence. See
RedundantParenCollapser.
recovery: RecoveryHow the engine handles reader-level errors.
Trait Implementations§
Source§impl Clone for ConversionOptions
impl Clone for ConversionOptions
Source§fn clone(&self) -> ConversionOptions
fn clone(&self) -> ConversionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more