I am capturing natural language user input and I need to check it against a predefined "correct" version. This much is trivial, but I am unsure about how to handle variations in contractions in the English language.
Suppose I'm expecting the sentence I'm positive you don't know what you're doing.
The match needs to be exact, but I don't want to lock users into just one variation, as that would get frustrating fast.
So, should I manually enter every possible variation of that sentence as valid matches? Like so:
"I'm positive you don't know what you're doing."
"I am positive you don't know what you're doing."
"I am positive you do not know what you're doing."
"I am positive you do not know what you are doing."
"I'm positive you don't know what you are doing."
...
Etc, etc. Think of more complex sentences and you can see how maddening this gets.
Or, is there a programmatic way I could handle this? With Regex, JS, Ruby, or Rails (the tools I'm using)?
Any help appreciated, thanks.