RedSparr0w / Discord-bot-pokeclicker

5 stars 12 forks source link

Disable levenshtein distance, and default to normal forms #6

Closed Aegyo closed 4 years ago

Aegyo commented 4 years ago

Passing false as the second argument to the FuzzySet constructor disables using Levenshtein distance, which gives us better matches for shortened names at the cost of potentially worse matches for misspellings.

With this change, we get better matches for the pokemon with alternate forms, without having to specify the form you want to see "arc" -> Arceus (Normal) "arc ice" -> Arceus (Ice)

An example of a bad match on a misspelling: "pokochu" -> Pichu

It seems that people are mostly using this command with a partial name for pokemon though, so I think this is an improvement overall