Natural Language Processing (NLP)

Writing a haiku-detecting bot for Slack

At Metal Toad, we have several bots integrated into Slack. Some are more useful (TicketBot, which detects mentions of JIRA tickets and provides links) and some are more whimsical (plusplus, which lets everyone give their coworkers points for whatever reason). I wanted to get in on this, so I decided to add to the latter category and write a bot that would detect when someone inadvertently wrote a haiku. Here's how I did it; maybe it will inspire you to write something too.

Ready for transformation?