dills122 / MTG-Card-Analyzer

Analyze images of MTG cards
MIT License
10 stars 3 forks source link

Refactor Type Fuzzy Matching #48

Open dills122 opened 5 years ago

dills122 commented 5 years ago

Type fuzzy matching in its current form is to complicated and not very accurate in some cases. It needs an overhaul to better match types and handle compound types.

Example: Artifact Creature would return Creature, but in this case Artifact should take president overCreature` for a smaller sample size.

Also Creature is way to dominate in the decision for type fuzzy matching currently.

Refactoring into a class based structure would be idea.

Consulting Magic's type rules and statistics would be helpful for this to better improve the accuracy of the matching.

Files: https://github.com/dills122/MTG-Card-Analyzer/blob/master/src/fuzzy-matching/match-type.js

https://github.com/dills122/MTG-Card-Analyzer/blob/master/src/fuzzy-matching/type-mapping.js