mbridak / not1mm

Not1MM != N1MM, An amateur radio contest logger for Linux.
GNU General Public License v3.0
105 stars 27 forks source link

Use thefuzz fuzzy matcher for SCP results #81

Closed arodland closed 8 months ago

arodland commented 8 months ago

this is nicer than prefix match:

arodland commented 8 months ago

There are a bunch of tweaks you could do to this if you feel like.

If you want to limit clutter you could filter the results based on the match percentage (the second item of the tuple returned from process.extract), or you could even pass the percentage through to the GUI and use it to shade the text differently.

And if you like you could wrap the fuzz.partial_ratio function with your own that assigns a higher score to prefix matches than to others, or use some sort of callsign-related smarts to adjust the scores.

But it works pretty decently as-is!

mbridak commented 8 months ago

Thanks! I'll take a look at it.