getHighestMatches function

List<PercentageMatch> getHighestMatches (
  1. List<String> sentences,
  2. String toCheck,
  3. {bool ignoreArticles: false,
  4. bool matchCaseInsensitively: true,
  5. bool ignoreSpecialCharacters: true}
)

Returns the best matches of toCheck against sentences.

If there are multiple PercentageMatches with the same PercentageMatch.percentage, there will be more than one item in the List returned. null will be returned if sentences is empty.

Implementation

List<PercentageMatch> getHighestMatches(List<String> sentences, String toCheck,
        {bool ignoreArticles = false,
        bool matchCaseInsensitively = true,
        bool ignoreSpecialCharacters = true}) =>
    getHighestMatchesFromMatches(getMatches(sentences, toCheck,
        ignoreArticles: ignoreArticles,
        matchCaseInsensitively: matchCaseInsensitively,
        ignoreSpecialCharacters: ignoreSpecialCharacters));