Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Weird result based on string case #22

Closed
Vadorequest opened this issue Dec 10, 2018 · 1 comment
Closed

Weird result based on string case #22

Vadorequest opened this issue Dec 10, 2018 · 1 comment

Comments

@Vadorequest
Copy link

I've tried to compare the strings, as follow:

stringSimilarity.findBestMatch('bnp', ['BNP Paribas', absolutelyunrelated])

Both rating are 0

stringSimilarity.findBestMatch('BNP', ['BNP Paribas', absolutelyunrelated])

BNP Paribas rating is 0.36363636363636365

I wouldn't expect 0 with bnp, I'd expect something around 0.2+ I guess, the difference is huge based on the string case.

@aceakash
Copy link
Owner

Hi @Vadorequest, the comparison is case-sensitive by design. If you want case-insensitive comparison, please convert all your inputs to uppercase or lowercase before comparing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants