In this tutorial we will create a simple and cool chatbot that will be able to answer your questions about a text data that you feed to it. Familiarity with NLTK and python programming is expected.
First, install NLTK by running the following command in your python/anaconda command prompt,
pip install nltk
Second, create a new Jupyter notebook.
Now, lets load NLTK packages,
from nltk.stem import WordNetLemmatizer
nltk.download('popular', quiet=True) #downloads packages
Our QA bots needs some data so that it can answer questions related to it.
You can create a new text file directly from…
Natural language processing is the process of building machine learning models that can understand text or speech and perform desired tasks.
Text or speech data is unstructured i.e. by seeing the data or numbers behind text or image you can not make sense of it. You need context, meaning and a lot of other things to make sense of a sentence or paragraph or even a word.
Otherwise how would you differ between bat and a bat (bird) or weak and week (in speech).
This makes natural language processing for machine learning more difficult than doing for numbers or dates…
See on GitHub
Machines use statistical modeling, neural networks and tonnes of text data to make sense of written/spoken words, sentences and context and meaning behind them.
NLP is an exponentially growing field of machine learning and artificial intelligence across industries and in various existing and new applications specially chatbots and voice assistants.
Top NLP applications include:
Short story of an IAS aspirant from Karnataka and what happened on the day of her result?
I couldn’t sleep the whole night. Anticipating my UPSC result. I have had many sleepless nights in the past one year but this was surely the longest.
I received an SMS from Vaani, my batch mate in coaching, saying that the results are out. I could not do this alone. I called up appa (dad) and amma (mom) in hometown.
“Appa the mains results are out.”
“Did you clear?”
“I am too scared to see alone.”
“Wait I’ll put on speaker phone, amma…
Data science and ML practitioners constantly work on classification problems across industries and applications. In many cases accuracy is not the best metric to judge a model. For example, a class imbalanced dataset might be more accurate on training data than on unseen/new data. There are tonnes of scenarios in which there is need for more metrics to judge and compare various models. Therefore it is wise to be aware of all-seasons (by all-seasons I mean any dataset) metrics to thoroughly analyze models.
‘Hands on AI’ is an initiative by Rajat Gupta (Lead Data Scientist @ Sci-Bi) to share practical AI guides and tutorials to experience first hand AI development