Building a Simple Chatbot from Scratch in Python (using NLTK)

Parul Pandey
Analytics Vidhya
Published in
11 min readSep 17, 2018

--

I am sure you’ve heard about Duolingo: a popular language-learning app, which gamifies practicing a new language. It is pretty popular due to its innovative styles of teaching a foreign language. The concept is simple: five to ten minutes of interactive training a day is enough to learn a language.

However, even though Duolingo enables people to learn a new language, its practitioners had a concern. People felt they were missing out on learning valuable conversational skills since they were learning on their own. People were also apprehensive about being paired with other language learners due to fear of embarrassment. This was turning out to be a significant bottleneck in Duolingo’s plans.

So their team solved this problem by building a native chatbot within its app to help users learn conversational skills and practice what they learned.

http://bots.duolingo.com/

Since the bots are designed as conversational and friendly, Duolingo learners can practice conversation any time of the day, using their choice of characters, until they feel brave enough to practice their new language with other speakers. This solved a major consumer pain point and made

--

--

Parul Pandey
Analytics Vidhya

Principal Data Scientist @H2O.ai | Author of Machine Learning for High-Risk Applications