dcporter / didyoumean.js

A simple, optimized JS library & node.js module for matching short, human-quality input to a list of possibilities.
Other
174 stars 12 forks source link

Result is auto-lowercased #1

Closed nicolasartman closed 10 years ago

nicolasartman commented 10 years ago

If caseSensitive is false, the returned result will be lowercased even if the original strings were not. This seems strange to me as I'd expect the returned result to always be one of the input set strings. Any particular reason for this behavior?

Thanks for the great lib!

dcporter commented 10 years ago

Nope, that's just a bad feature design on my part. I'm on a deadline today so I haven't had a chance to test it (like even run it), but please have a look at the new capsfix branch (min here) and let me know if it a) runs, b) works, and c) fixes the bug.

Glad it's useful!

nicolasartman commented 10 years ago

Just tried it out on some basic sample data that I was using to find the best thresholds for my use case and it looks good! Thanks for the quick turnaround!