6 Sequence to Sequence Models
This chapter covers
- Building a machine translation system using fairseq
- Transforming one sentence to another using a Seq2Seq model
- Using a beam search decoder to generate better output
- Evaluating the quality of machine translation systems
- Building a dialog system (chatbot) using a Seq2Seq model
In this chapter, we are going to discuss sequence to sequence (Seq2Seq) models, which are some of the most important complex NLP models and are used for a wide range of applications including machine translation. Nowadays, Seq2Seq models and their variations are already used as the fundamental building blocks in many real-world applications, including Google Translate, speech recognition, and so on. We are going to build a simple neural machine translation system using a powerful framework to learn how the models work and how to generate the output using greedy and beam search algorithms. At the end of this chapter, we will build a chatbot—an NLP application with which you can have a conversation. We’ll also discuss challenges and limitations of simple Seq2Seq models.