/// <summary> /// Creates a sorted list of ExtractedResult with the closest matches first /// </summary> /// <param name="query"></param> /// <param name="choices"></param> /// <param name="processor"></param> /// <param name="scorer"></param> /// <param name="cutoff"></param> /// <returns></returns> public static IEnumerable <ExtractedResult <string> > ExtractSorted( string query, IEnumerable <string> choices) { var processor = s_defaultStringProcessor; var scorer = s_defaultScorer; return(ResultExtractor.ExtractSorted(query, choices, processor, scorer, 0)); }
/// <summary> /// Creates a sorted list of ExtractedResult with the closest matches first /// </summary> /// <param name="query"></param> /// <param name="choices"></param> /// <param name="processor"></param> /// <param name="scorer"></param> /// <param name="cutoff"></param> /// <returns></returns> public static IEnumerable <ExtractedResult <T> > ExtractSorted <T>( T query, IEnumerable <T> choices, Func <T, string> processor, IRatioScorer scorer = null, int cutoff = 0) { if (scorer == null) { scorer = s_defaultScorer; } return(ResultExtractor.ExtractSorted(query, choices, processor, scorer, cutoff)); }
/// <summary> /// Creates a sorted list of ExtractedResult with the closest matches first /// </summary> /// <param name="query"></param> /// <param name="choices"></param> /// <param name="processor"></param> /// <param name="scorer"></param> /// <param name="cutoff"></param> /// <returns></returns> public static IEnumerable <ExtractedResult <string> > ExtractSorted( string query, IEnumerable <string> choices, Func <string, string> processor, IRatioScorer scorer, int cutoff) { if (processor == null) { processor = s_defaultStringProcessor; } if (scorer == null) { scorer = s_defaultScorer; } return(ResultExtractor.ExtractSorted(query, choices, processor, scorer, cutoff)); }