Lesson 5: Natural Language Processing
Uses of NLP
Conversational agents such as Siri and Alexa are starting to be present everywhere and are changing human-to-computer interaction.
Here are some examples:
- Chatbots — Answering questions and more.
- Conversational agents — Conversing using human language.
- Machine Translation — Converting text from one language to another.
- Predictive Text — Suggesting the next word as the user is typing.
- Sentiment Analysis — Determining whether the customer left a positive review.
- Social Media Analysis — Interpreting posts by users.
- Spam Filters — Detecting emails that are not genuine.
What conversational agents do you encounter in daily life? Describe a typical interaction.
Challenges
Some of the challenges that arise with NLP are:
- Ambiguity - a single sentence might have multiple meanings
- Slang - the words might not be understood outside a specific group or context
- Partial statements - might be wrongly interpreted
- Typos - typing errors might cause misunderstandings
- Dialects in spoken word - unfamiliar pronunciation might be hard to understand
- Language structure differences - for example, the word order in English is subject first, verb second, object last (SVO), while in Japanese it is SOV.
Sentiment Analysis
This simple Sentiment Analysis example uses data from film reviews to train a model.
Type in a sentence and calculate whether the statement is positive or negative.
Negative example: I was on hold for 40 minutes, their customer support service is a nightmare
Positive example: Wonderful product and really did what I expected
Deep Neural Networks
Deep learning speech synthesis uses Deep Neural Networks (DNN) to produce artificial speech from text (text-to-speech) or spectrum (vocoder). The deep neural networks are trained using a large amount of recorded speech and, in the case of a text-to-speech system, the associated labels and/or input text.