Skip to content

IuriiD/nirvana_bot

Repository files navigation

Podervianskogobot

(August 2018 - February 2019)

Try it on Facebook | Telegram | Skype | Web

This is a copy of text from my site https://iuriid.github.io/.

This is the 2nd generation of code for this project, see the 1st here

Stack of the bot:

This is a bot which replies with popular quotes (drawn on stickers) from plays by Les' Poderviansky (the bot is in Ukrainian) and allows to read and listen to respective plays performed by the Author. Les Podervianskyi is a Ukrainian painter, poet, playwright and performer. He is most famous for his absurd, highly satirical, and at times obscene short plays, many quotes from which bacame popular memes (more on Wikipedia).

The bot was made using Node.js, Microsoft Bot Framework and npl.js. Actually this is the 2nd "generation" of the bot, and the 1st (which wasn't launched and was supposed only for Telegram) was made using Node.js, telegraf wrapper of Telegram API and RiveScript.

I started to work on it last summer (>6 months ago), before I started to cooperate with Master of Code. Thought that it would be funny to make such a bot, and also had a chance to try several new things, mainly RiveScript and npl.js (inspired by this article). This was also my 1st 'live' bot on MS Bot Framework and the 1st bot for Skype and Web.

To make this bot I:
=> Read through >25 plays by L.P. from this source, chose the most popular quotes (got ~140 of them);
=> Took the most popular requests from Dialogflow's Smalltalk and assigned quotes from L.P.'s plays as responses to those requests;
=> Contacted with Les Podervianky's representative to discuss copyright moments and got an approval;
=> Draw stickers for all those quotes + separate stickers for the plays (~140 in total, this took up to 60% of time working on this project ;);
=> Copied, parsed and formatted the texts of the plays, downloaded and prepared the audios.
=> Created the bot itself on Node.js using Microsoft Bot Framework for 4 platforms (Telegram, Facebook, Skype, Web). Also wanted to make a version for Viber but their current policy doesn't allow that :( The bot is actually quite simple - after greeting each user's input is "fed" to NLU block which tries to respond with relevant quote. If no intens are triggered than a simple full-text search is made and user is presented with a list of plays in which his/her input was found. If no such phrases were found, user gets a default fallback response.
=> In this bot I used open source library for NLU - nlp.js inspired by the above-mentioned article. My conclusion for npl.js - a nice tool and could be used if third-party solutions are not allowed for some reasons but for production I would still use Dialogflow or LUIS.
=> Deployed the bot to an AWS EC2 instance. This bot is not using DB and ElasticSearch (thought these could be used and could improve the bot) and thus can be hosted on a single t2.micro instance which is free under free-tier plan.

So far the bot had about 20 users from Facebook, ~10 from Telegram and a few from Skype and Web version.

About

Bot for Les' Podervjansky - v.2.0. Node.js, MS Bot Framework, nlp.js. Available on Facebook Messenger, Telegram, Skype, Web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published