compareStrings
Stentor API Reference / stentor-utils/src / compareStrings
Function: compareStrings()
compareStrings(
one,two):boolean
Defined in: packages/stentor-utils/src/string/compare.ts:29
Compares two strings for loose equality.
It will clean punctuation, lowercase, and remove all stop words for both the strings and then compare them for equality.
It allows a string like "What is conversational AI" to equal "What are conversational AI?".
Parameters​
one​
string
two​
string
Returns​
boolean
True if the sentences are basically the same.