Chapter 7: Text Translation Using Sequence-to-Sequence Neural Networks
In the previous two chapters, we used neural networks to classify text and perform sentiment analysis. Both tasks involve taking an NLP input and predicting some value. In the case of our sentiment analysis, this was a number between 0 and 1 representing the sentiment of our sentence. In the case of our sentence classification model, our output was a multi-class prediction, of which there were several categories our sentence belonged to. But what if we wish to make not just a single prediction, but predict a whole sentence? In this chapter, we will build a sequence-to-sequence model that takes a sentence in one language as input and outputs the translation of this sentence in another language.
We have already explored several types of neural network architecture used for NLP learning, namely recurrent neural networks in Chapter 5, Recurrent Neural Networks and Sentiment Analysis, and convolutional neural networks...