Skip to main content

answer_values

Function answer_values 

Source
pub fn answer_values(
    ids: &[u32],
    first: usize,
    last: usize,
    text: &TokenText,
) -> Vec<Vec<usize>>
Expand description

The target positions of each top-level value of the JSON object an answer span holds ({"q1": "option_24", "q2": 3} → two groups), in order. A token overlapping a value’s characters belongs to it, so a token that merges a quote with the label’s first letters is graded with the label. Positions are indices into ids, within first..=last.