pub struct RenderExplanation {Show 13 fields
pub output: String,
pub template_key: String,
pub variant_index: usize,
pub variant_source: String,
pub salience: Salience,
pub candidate_scores: Option<Vec<f64>>,
pub reference_form: Option<ReferenceForm>,
pub connective: Option<&'static str>,
pub list_style: Option<ListStyle>,
pub focus_is_plural: bool,
pub length_split_applied: bool,
pub cleanup_stripped_tail: bool,
pub centering_transition: Transition,
}Expand description
Per-render diagnostics — everything the engine decided along the
way to produce the final output. Returned by
Engine::render_explained. Useful for template-author debugging
(“why did variant B win?”) and for vocab-module linting.
Fields§
§output: StringThe final rendered string after all post-processing.
template_key: StringTemplate key that was rendered.
variant_index: usizeIndex (within the salience-filtered alternative set) of the variant that was emitted.
variant_source: StringSource string of the selected variant.
salience: SalienceSalience bucket used for filtering alternatives.
candidate_scores: Option<Vec<f64>>Choose-best discourse scores for each alternative that was considered
(in the same order as the filtered alternative set). None when
choose-best wasn’t applicable (first render, or Fixed / RoundRobin
variation).
reference_form: Option<ReferenceForm>Reference form chosen by {name|refer} on the primary entity,
if a refer pipe fired.
connective: Option<&'static str>Discourse connective prepended to the output, if any.
list_style: Option<ListStyle>List style used, if a join pipe fired.
focus_is_plural: boolWhether the focus subject was plural (compound) at render time.
length_split_applied: boolWhether the sentence was split by the length-budgeting pass.
cleanup_stripped_tail: boolWhether the silent-mode cleanup stripped any trailing orphan words from the output.
centering_transition: TransitionCentering Theory transition class for this render. Reflects how the
discourse center moved relative to the previous render. NoCb on the
first render or after a session reset.
Trait Implementations§
Source§impl Clone for RenderExplanation
impl Clone for RenderExplanation
Source§fn clone(&self) -> RenderExplanation
fn clone(&self) -> RenderExplanation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more