mutewinter / Showbot

🤖 An IRC Bot and Website for 5by5.tv written with the Cinch and Sinatra frameworks
MIT License
90 stars 31 forks source link

Grouping similar title suggestions #35

Closed gouwens closed 12 years ago

gouwens commented 12 years ago

I've added a new view to Showbot that groups similar titles together. With so many titles added these days, sometimes there are slight spelling or wording variants, and I thought it would be useful to consolidate those so only the most popular one is visible.

I created a new model ("Cluster") that collects similar titles together - it uses a similarity score based on the Levenshtein distance between titles. All titles can be voted for, and the one with the most votes is shown by default. Each cluster can be expanded to see all the titles included, and the total number of votes for all the titles in a cluster is shown as well.

I'm pretty new to this whole web app programming thing, so the code is not be optimized for performance or anything like that. But it at least works as it is now. I'm happy to work on it further if it seems useful.

I've included an example screenshot that shows what the new view looks like, using some recent Back to Work titles and vote counts (grabbed from the live Showbot): Example Screenshot

mutewinter commented 12 years ago

Holy crap this is amazing. I never would have thought of solving the problem in this way. I'm going to merge this and test it locally before deploying.

Incredible work.

mutewinter commented 12 years ago

It's live!

gouwens commented 12 years ago

Great! Glad you found it useful. I've been monitoring it a couple times live and it seems to be working pretty well (at least as far as I can tell on the user's side), but certainly let me know if any issues crop up.