/// <summary> /// Find the single best match above a score in a list of choices. /// </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 ExtractedResult <string> ExtractOne( string query, IEnumerable <string> choices) { var processor = s_defaultStringProcessor; var scorer = s_defaultScorer; return(ResultExtractor.ExtractOne(query, choices, processor, scorer, 0)); }
/// <summary> /// Find the single best match above a score in a list of choices. /// </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 ExtractedResult <T> ExtractOne <T>( T query, IEnumerable <T> choices, Func <T, string> processor, IRatioScorer scorer = null, int cutoff = 0) { if (scorer == null) { scorer = s_defaultScorer; } return(ResultExtractor.ExtractOne(query, choices, processor, scorer, cutoff)); }
/// <summary> /// Find the single best match above a score in a list of choices. /// </summary> /// <param name="query"></param> /// <param name="choices"></param> /// <returns></returns> public static ExtractedResult <string> ExtractOne(string query, params string[] choices) { return(ResultExtractor.ExtractOne(query, choices, s_defaultStringProcessor, s_defaultScorer)); }