Chapter 1 Solutions
Chapter 1 Solutions
Chapter 1 Solutions
Core applications:
Email platforms,
Voice-based assistants,
Modern search engines,
Machine translation
Language modeling This is the task of predicting what the next word in a sentence will be based
on the history of previous words. The goal of this task is to learn the probability of a sequence of
words appearing in a given language.
Text classification This is the task of bucketing the text into a known set of categories based on
its content
Information extraction As the name indicates, this is the task of extracting relevant information
from text
Information retrieval This is the task of finding documents relevant to a user query from a large
collection
Text summarization This task aims to create short summaries of longer documents
Question answering This is the task of building a system that can automatically answer
questions
Machine translation This is the task of converting a piece of text from one language to another
Topic modeling This is the task of uncovering the topical structure of a large collection of
documents
3. What are the building blocks of language and their applications?
common knowledge : It is the set of all facts that most humans are aware of.
One of the key challenges in NLP is how to encode all the things that are common knowledge to
humans in a computational mode.
Creativity
Diversity across languages
artificial intelligence (AI) is a branch of computer science that aims to build systems that can
perform tasks that require human intelligence.
Machine learning (ML) is a branch of AI that deals with the development of algorithms that can
learn to perform tasks
Deep learning (DL) refers to the branch of machine learning that is based on artificial neural
network architectures
6. Describe the heuristics-based NLP.?
attempts at designing NLP systems were based on building rules for the task at hand.
It uses counts of positive and negative words in the text to deduce the sentiment of the text.
7. Explain briefly Naive Bayes, Support Vector Machine, Hidden Markov Model, And
Conditional Random Fields approaches.?
Naive Bayes is a classic algorithm for classification tasks that mainly relies on Bayes’ theorem.
Using Bayes’ theorem, it calculates the probability of observing a class label given the set of
features for the input data
The support vector machine (SVM) is another popular classification algorithm. The goal in any
classification approach is to learn a decision boundary that acts as a separation between
different categories of text
The biggest strength of SVMs are their robustness to variation and noise in the data.
A major weakness is the time taken to train and the inability to scale when there are large
amounts of training data.
The hidden Markov model (HMM) is a statistical model that assumes there is an underlying,
unobservable process with hidden states that generates the data
The conditional random field (CRF) is another algorithm that is used for sequential data.
Conceptually, a CRF essentially performs a classification task on each element in the sequence
Recurrent neural networks (RNNs) are specially designed to keep such sequential processing
and learning in mind. RNNs have neural units that are capable of remembering what they have
processed so far.
LSTM they cannot remember longer contexts and therefore do not perform well when the input
text is long
9. How CNN can be used for text processing?
Convolutional neural networks (CNNs) are very popular and used heavily in computer vision
tasks like image classification, video recognition, etc. CNNs have also seen success in NLP,
especially in text-classification tasks. One can replace each word in a sentence with its
corresponding word vector, and all vectors are of the same size
Transfer learning is a technique in AI where the knowledge gained while solving one problem is
applied to a different but related problem
12. List the key reason that makes DL not suitable for all NLP tasks ?
Domain adaptation
Interpretable models : Businesses often demand more interpretable results that can be
explained to the customer or end user Cost.
Common sense and world knowledge : Since this world knowledge and common sense are
inherent in language, understanding them is crucial for any DL model to perform well on various
language tasks
On-device deployment : NLP solution needs to be deployed on an embedded device rather than
in the cloud
13. Explain the flow of conversation agents ?
Natural language understanding : This can be broken into many small NLP subtasks, such as:
• Sentiment analysis: Here, we analyze the sentiment of the user response.
• Named entity recognition: Here, we identify all the important entities the user mentioned in
their response.
• Coreference resolution: Here, we find out the references of the extracted entities.
Dialog management
Response generation