string_processor library

Classes

PercentageMatch
The sentence and how much percentage it was matched.
WordsMatch
The sentence matched and how many words in it were matched.

Functions

countWordsMatched(String matchAgainst, String matchFor, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) → int
Returns how many words in matchFor matched against matchAgainst.
countWordsMatchedIn(List<String> sentences, String matchFor, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) → List<WordsMatch>
Returns how many words each item in sentences matched in matchFor.
getHighestMatch(List<String> sentences, String toCheck, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) PercentageMatch
Returns the best match of toCheck against sentences. [...]
getHighestMatches(List<String> sentences, String toCheck, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) → List<PercentageMatch>
Returns the best matches of toCheck against sentences. [...]
getHighestMatchesFromMatches(List<PercentageMatch> matches) → List<PercentageMatch>
Returns the matches with the highest PercentageMatch.percentage. [...]
getHighestMatchFromMatches(List<PercentageMatch> matches) PercentageMatch
Returns the match having the highest PercentageMatch.percentage. [...]
getMatches(List<String> sentences, String toCheck, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) → List<PercentageMatch>
Returns percentages each sentence in sentences matched against toCheck.
getPercentageMatched(String sentence, String toCheck, { bool ignoreArticles: false, bool matchCaseInsensitively: true, bool ignoreSpecialCharacters: true }) → int
Returns the percentage toCheck matched against sentence.
removeArticles(String sentence) → String
Article"s are the words "a", "an", and "the". [...]
removeSpecialCharactersAroundWords(String string) → String
Returns string after removing each word's surrounding special characters.
removeSurroundingSpecialCharacters(String string) → String
Returns string without trailing and leading special characters.