Skip to main content

score_passages

Function score_passages 

Source
pub fn score_passages(
    classified: &[ClassifiedPassage],
    recurrence_map: &HashMap<String, RecurrenceResult>,
    config: &ScoringConfig,
    now_timestamp: i64,
) -> Vec<ImportanceSegment>
Expand description

Score classified passages and produce ranked ImportanceSegment values.

  1. Filters out superseded passages
  2. Computes importance score for each remaining passage
  3. Sorts by score descending (ties broken by timestamp descending, then text ascending)

recurrence_map: maps term -> RecurrenceResult for score lookup. now_timestamp: current time in Unix seconds (for recency calculation).