Zoltar the Conversationalist

Earlier this week, I added in some more functionality to my Skype bot, Zoltar. Previously, it would only respond when a user requested a fortune (a search on Twitter for a prediction).

I adjusted things so that when he is invoked (when someone begins a sentence with ‘z’ and a space), he will try to respond by pulling in a comment from Twitter.

There’s a lot of fun stuff at work, under the hood. I’m using RiTa.js to determine which words a user types are nouns and verbs. I then have a sprinkling of logic that checks for specific keywords (if you use ‘why’ in your message, I will add the word ‘because’ to Zoltar’s search).

For previous bots, I used to search for complete tweets, and use them 100% start to finish. For this approach, I decided to look for the occurrence of a phrase – and just grabbed the text that began with that, until the end.

This opens up a lot more possible responses. Granted, some of them don’t quite make sense, but they seem to hit more often than they miss. It’s a pattern I may end up tinkering with more, in the near future.

zoltarConversation_1a
Woah, Zoltar!

Since I’m using Twitter as my source material, I’m also making sure to clean things up by employing wordfilter, by Darius Kazemi. I don’t think it catches all the crazy, but weeds out a lot.

zoltarConversation_2a
For now, I think I’ve hit my limit for what I want to do with Zoltar. Functionally, he mirrors some basic Slack actions I wanted to have in Skype. And beyond the fortune and responses, there’s not a lot more I could see him doing.

I still have a few Easter Eggs hidden in the code, and I’m waiting for them to get triggered. I have to say – even after a week or so of having this bot be part of my work chat room, I’m not tired of him. I still get delighted watching my coworkers interact wtih him, asking for GIFs and fortunes. It’s really fun.

If you want to try things out, you can add Zoltar as a contact in Skype.

Related:
I Made a Skype Bot – His Name is Zoltar

This Post Has 0 Comments

Leave A Reply