The field of natural language processing is shifting from statistical methods to neural network methods.
There are still many challenging problems to solve in natural language. Nevertheless, deep learning methods are achieving state-of-the-art results on some specific language problems.
It is not just the performance of deep learning models on benchmark problems that is most interesting; it is the fact that a single model can learn word meaning and perform language tasks, obviating the need for a pipeline of specialized and hand-crafted methods.
In this post, you will discover 7 interesting natural language processing tasks where deep learning methods are achieving some headway.
Kick-start your project with my new book Deep Learning for Natural Language Processing, including step-by-step tutorials and the Python source code files for all examples.
Let’s get started.
Overview
In this post, we will look at the following 7 natural language processing problems.
- Text Classification
- Language Modeling
- Speech Recognition
- Caption Generation
- Machine Translation
- Document Summarization
- Question Answering
I have tried to focus on the types of end-user problems that you may be interested in, as opposed to more academic or linguistic sub-problems where deep learning does well such as part-of-speech tagging, chunking, named entity recognition, and so on.
Each example provides a description of the problem, an example, and references to papers that demonstrate the methods and results. Most references are drawn from Goldberg’s excellent 2015 primer on deep learning for NLP researchers.
Do you have a favorite NLP application for deep learning that is not listed?
Let me know in the comments below.
Need help with Deep Learning for Text Data?
Take my free 7-day email crash course now (with code).
Click to sign-up and also get a free PDF Ebook version of the course.
1. Text Classification
Given an example of text, predict a predefined class label.
The goal of text categorization is to classify the topic or theme of a document.
— Page 575, Foundations of Statistical Natural Language Processing, 1999.
A popular classification example is sentiment analysis where class labels represent the emotional tone of the source text such as “positive” or “negative“.
Below are a 3 more examples:
- Spam filtering, classifying email text as spam or not.
- Language identification, classifying the language of the source text.
- Genre classification, classifying the genre of a fictional story.
Further, the problem may be framed in a way that requires multiple classes assigned to a text, so-called multi-label classification. Such as predicting multiple hashtags for a source tweet.
For more on the general topic, see:
Below are 3 examples of deep learning papers for text classification:
- Sentiment analysis of rotten tomato movie reviews.
- Sentiment analysis of amazon product reviews, IMDB movie reviews and topic categorization of news articles.
- Sentiment analysis of movie reviews, classifying sentences as being subjective or objective, classifying question types, sentiment of product reviews and more.
2. Language Modeling
Language modeling is really a subtask of more interesting natural language problems, specifically those that condition the language model on some other input.
… the problem is to predict the next word given the previous words. The task is fundamental to speech or optical character recognition, and is also used for spelling correction, handwriting recognition, and statistical machine translation.
— Page 191, Foundations of Statistical Natural Language Processing, 1999.
In addition to the academic interest in language modeling, it is a key component of many deep learning natural language processing architectures.
A language model learns the probabilistic relationship between words such that new sequences of words can be generated that are statistically consistent with the source text.
Alone, language models can be used for text or speech generation; for example:
- Generating new article headlines.
- Generating new sentences, paragraphs, or documents.
- Generating suggested continuation of a sentence.
For more in language modeling, see:
- Language model on Wikipedia
- The Unreasonable Effectiveness of Recurrent Neural Networks, 2015.
- Generative Model-Based Text-to-Speech Synthesis, Lecture 10, Oxford, 2017
Below is an example of deep learning for language modeling (only):
- Language model of English texts, books and news articles.
3. Speech Recognition
Speech recognition is the problem of understanding what was said.
The task of speech recognition is to map an acoustic signal containing a spoken natural language utterance into the corresponding sequence of words intended by the speaker.
— Page 458, Deep Learning, 2016.
Given an utterance of text as audio data, the model must produce human readable text.
Given the automatic nature of the process, the problem may also be called Automatic Speech Recognition (ASR).
A language model is used to create the text output that is conditioned on the audio data.
Some examples include:
- Transcribing a speech.
- Creating text captions for a movie or TV show.
- Issuing commands to the radio while driving.
For more on speech recognition, see:
Below are 3 examples of deep learning for speech recognition.
- English speech to text.
- English speech to text.
- English speech to text.
4. Caption Generation
Caption generation is the problem of describing the contents of an image.
Given a digital image, such as a photo, generate a textual description of the contents of the image.
A language model is used to create the caption that is conditioned on the image.
Some examples include:
- Describing the contents of a scene.
- Creating a caption for a photograph.
- Describing a video.
This is not just an application for the hearing impaired, but also in generating human readable text for image and video data that can be searched, such as on the web.
Below are 3 examples of deep learning for caption generation:
- Generating captions for photographs.
- Generating captions for photographs.
- Generating captions for videos.
5. Machine Translation
Machine translation is the problem of converting a source text in one language to another language.
Machine translation, the automatic translation of text or speech from one language to another, is one [of] the most important applications of NLP.
— Page 463, Foundations of Statistical Natural Language Processing, 1999.
Given that deep neural networks are used, the field is referred to as neural machine translation.
In a machine translation task, the input already consists of a sequence of symbols in some language, and the computer program must convert this int a sequence of symbols in another language. This is commonly applied to natural languages, such as translating from English to French. Deep learning has recently begun to have an important impact on this kind of task.
— Page 98, Deep Learning, 2016.
A language model is used to output the destination text in the second language, conditioned on the source text.
Some examples include:
- Translating a text document from French to English.
- Translating Spanish audio to German text.
- Translating English text to Italian audio.
For more on neural machine translation, see:
Below are 3 examples of deep learning for machine translation:
- Translation of text from English to French.
- Translation of text from English to French.
- Translation of text from English to French.
6. Document Summarization
Document summarization is the task where a short description of a text document is created.
As above, a language model is used to output the summary conditioned on the full document.
Some examples of document summarization include:
- Creating a heading for a document.
- Creating an abstract of a document.
For more on the topic, see:
- Automatic summarization on Wikipedia.
- Has Deep Learning been applied to automatic text summarization (successfully)?
Below are 3 examples of deep learning for document summarization:
- Summarization of sentences in news articles.
- Summarization of sentences in news articles.
- Summarization of sentences in news articles.
7. Question Answering
Question answering is the problem where given a subject, such as a document of text, answer a specific question about the subject.
… question answering systems which try to answer a user query that is formulated in the form of a question by return the appropriate none phrase such as a location, a person, or a date. For example, the question Why killed President Kennedy? might be answered with the noun phrase Oswald
— Page 377, Foundations of Statistical Natural Language Processing, 1999.
Some examples include:
For more information on question answering, see:
- Answering questions about Wikipedia articles.
- Answering questions about news articles.
- Answering questions about medical records.
Below are 3 examples of deep learning for question answering:
- Answering questions about news articles.
- Answering general knowledge questions over freebase articles.
- Answers factoid questions given specific documents.
Further Reading
This section provides more resources on deep learning applications for NLP if you are looking go deeper.
- A Primer on Neural Network Models for Natural Language Processing, 2015.
- Natural Language Processing (almost) from Scratch, 2011.
- Deep Learning for Natural Language Processing, Practicals Overview, Oxford, 2017
- What NLP problems has deep learning or neural networks been applied to successfully?
- Can deep learning make similar breakthroughs in natural language processing as it did in vision & speech?
Summary
In this post, you discovered 7 applications of deep learning to natural language processing tasks.
Was your favorite example of deep learning for NLP missed?
Let me know in the comments.
Do you have any questions?
Ask your questions in the comments below and I will do my best to answer.
Hi Jason, I enjoyed reading it, thank you. Are you planning to create a coding example/tutorial for Q&A model with Keras? I need an implementation with variable question and answer size
I hope to implement one soon.
Hi Jason,
Thank you so much for a great introduction to the field and a wealth of resources! So clearly and concisely explained, a real pleasure to read and a great help to me with my project.
My project is probably most closely related to Sentiment Analysis, but I wish to go deeer . I am relatively new to Machine Learning and I really like to comprehend thoughrally the essence of the subject. Which why I find your site very, very good indeed. Thank you!
Thanks.
Sentiment analysis more broadly is text classification, and you can find many tutorials on the topic. Perhaps start here:
https://machinelearningmastery.com/start-here/#nlp
Good read! I’m starting a little project as well… very unique in natural language processing
Thanks Emeka.
Hi Jason,
I see you have begun your series on ML with text.
Nice one
Yes! Thanks for your support Chiedu.
Respected sir thanks for this nice and knowledgeable post on NLP tasks
I read some paper on part of speech tagging where deep learning also perform well
Can you please have a post on that as well ? And also some sort of implementation with keras. I will love to inspire it . thanks once again
Thanks for the suggestion.
Great post. I would like to leverage this technology in my graduate thesis work, subjecting propaganda to various analyses. Do you know of any low-cost or education-friendly services available for people like me to conduct such research using machine learning?
Thanks for the great post.
Respectfully,
Ben
What services you mean exactly Ben? Source of data?
Hey Jason – thanks for this article and list of resources. I’m looking to use NLP to review contracts for determining if key areas of information have been completed; principal names, addresses, signatures, etc. Currently doing this with manual scanning, ugh. “Question Answering” seems close – any suggestions on tools or types of tech to deploy? Thanks
Interesting. Sounds like engineering (checking each field) might be better than machine learning, but I don’t really know the problem well.
Awesome work Sir.Would be better, if explained with working examples.
Thanks
I’m working on it…
You are amazing! It just took 5 mins to read and understand this blog to get an idea about different field in Deep learning. Now I can really narrow down by research for my project. Thank you and appreciate your effort. BTW, I bought your text book last month and I am loving it. Please keep it coming.
Thanks Deepu.
Hi Jason,
I have a body of text and I want to derive some inferences from it. For example :
Input :
If bit A is set bit B cannot be set.
If bit A is 1 then B cannot be written.
…
Output :
To set B, A must be set
How would you classify this problem and what approach do you recommend?
Thanks
Perhaps you can prepare millions of input-output examples in text and train an NLP model?
Perhaps you can translate the text to a binary format and learn a simple logic program?
Excellent intro.I would like to know more about how deep learning can be used for named entity recognition
Perhaps start with a search on google scholar.
hay jason
very interesting, will u help to send me the coding phase for text summarization in pythan
I have posts on the topic here:
https://machinelearningmastery.com/?s=text+summarization&submit=Search
Hi Jason,
How to provide feature vectors extracted from audio as input to RNN networks in python ?
Sorry, I do not have an example at this stage.
Hi Jason,
Found this article interesting. I have an idea of summarizing highlights of a sport from a set of commentaries. Taking cricket, given the whole commentary set of the match I have to pick out commentaries correspoding to any of the highlights such as 4s,6s or wickets. Please help me by answering what I have to do? What method can i use text classification or text summarization? How to do that method with respect to this context?
It might be a text summarization problem. You can learn more about text summarization here:
https://machinelearningmastery.com/?s=text+summarization&post_type=post&submit=Search
You can learn more about NLP in general here:
https://machinelearningmastery.com/start-here/#nlp
You can use this general process to work through your problem systematically here:
https://machinelearningmastery.com/start-here/#process
I hope that helps as a start.
Hello Jason,
Its always inspiring to learn from your blog.
I am trying to learn about Question Answering. Have you implemented one already?
Would love to learn from it.
Thanks
Not yet, I hope to have an example in the future.
Great Article .. Feeling confident ..Started 7 day mini-course
“Deep Learning for NLP Crash Course.”
Nice work!
Hello sir..could you please explain how text classification works.. Is there any algorithm….?
Yes, here is an example:
https://machinelearningmastery.com/develop-word-embedding-model-predicting-movie-review-sentiment/
Hi,
Are you planning to provide natural language processing concepts and code for speech recognition?
I do hope to cover speech in the future.
Thank you Jason, found this article very fruitful for my research work
I’m happy to hear that.
Hi Jason – great article, but on the last one, Question Answering I have question and I guess I would beg to differ with your descriptions.
1. Taking a text corpus as input using NLU/TE to answer questions from paragraph is termed Machine Reading comprehension or machine reading or machine comprehension of am not wrong .
2. On the other hand people extracting factoid information from a corpus of text and storing it in a knowledge graph style data store to answer factoid questions is typically called QA system I believe.
QA is a umbrella term ? Am I missing something ?
Thanks for the note.
I need an idea for my PhD research in this field, but it seems that everything has been done!
Perhaps talk to your research advisor.
Jason,very good article, it’s gives me overview on NLP, could you please provide programming code of the above 7 models.. Thanks
They are covered on the blog, perhaps start here:
https://machinelearningmastery.com/start-here/#nlp
What GPUs you would recommend for NLP?
I’ve found few companies like https://www.exxactcorp.com and https://bizon-tech.com/us/workstations/deeplearning/ building deep learning workstations, but not sure about configuration.
I recommend running on AWS EC2 for now.
hello
thank you for your effort
I want to reference the information you post here
how I reference it ? does all info here is in your book?
so I just reference the book?
You can reference the website or the book. I have an example here:
https://machinelearningmastery.com/faq/single-faq/can-i-use-your-code-in-my-own-project
Can u suggest me any new idea for the research using deep learning
This is a common question that I answer here:
https://machinelearningmastery.com/faq/single-faq/what-research-topic-should-i-work-on
Hi Jason,
I am interested in the Meaning and Reasoning by using Word2Vec and deeplearning to convert the Text files to Unified Modeling Language( UML) text and then to convert the UML text to the differential interpreter code.
Please, Can you suggest a book or lectures to help me in my project?
Thanks with kindest regards,
Sounds like a great project.
Perhaps you can start by developing some word vectors:
https://machinelearningmastery.com/develop-word-embeddings-python-gensim/
Hello Jason,
I need to extract patterns or some required text from a PDF document. Hence i guess that this objective involves semantic analysis. You have mentioned 7 applications of NLP in the above article. In which category does my objective fall ? could you please suggest any of your book which will be useful for me.
Regards,
Amita
It might be text extraction, it might even be a computer vision +NLP problem if the inputs are images or image-like.
Hello sir. I am currently working on document classification by extracting the text and using Multinominal Naive Bayes. I discover there are a lot of false positive using the model.
Perhaps you can use a roc curve and choose a threshold that reduces the false positives?
Keep being awesome, I will be saying congratulations!
Thanks.
how to start the course?Link?Is it video lecture?
No, it’s an email course, or you can work through the lessons here:
https://machinelearningmastery.com/crash-course-deep-learning-natural-language-processing/