Understanding the data

The data that we're working with is a text file. Each line has a single English phrase and its French translation, separated by a single tab, as shown in the following code:

Ignore Tom. Ignorez Tom.

(I'm not sure what Tom did to the author of the dataset...)

There are often rows with duplicate French translations for each English translation. This occurs when there are multiple common ways to translate the English phrase. Have a look at the following code for example:

Go now.    Va, maintenant.
Go now. Allez-y maintenant.
Go now. Vas-y maintenant.

Since we are building a character-level sequence-to-sequence model, we will need to load the data into memory and then one hot encode each input and output saying at the character level. That's the hard part. Let's do that next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.75.217