kinbiko / twitch-bot

0 stars 0 forks source link

Make !xkcd command smarter re: various non-alphanumeric characters #2

Open kinbiko opened 4 years ago

kinbiko commented 4 years ago

Currently the algorithm for finding relevant words in an xkcd comic doesn't take into account that there may be neighbouring newlines or punctuation (e.g. ., ,).

Update the algorithm to not only naively use spaces to delimit words.

kinbiko commented 4 years ago

https://golangcookbook.com/chapters/strings/processing/