Skip to main content

optimize

Function optimize 

Source
pub fn optimize<'a>(
    ground: &str,
    blocks: &[&'a str],
    config: &AlgoConfig,
) -> (MatchingLoss, Vec<(usize, &'a str)>)
Expand description

Core function: Optimize the matching order of a list of strings against ground truth.

§Arguments

  • ground - The ground truth string to match against
  • blocks - Slice of strings to be matched/ordered
  • config - Parameters for the algorithm

§Returns

Tuple of (MatchingLoss, Vec of (index, text) tuples representing optimal order)