Now that we have a trained model, we're going to actually generate some translations.
Overall, the steps for inference are as follows:
- Load the data and vectorize again (we need the character to index mappings and a few translations to test with)
- Using the character to index dictionaries, we will create reverse index to character dictionaries, so we can get back from numbers to characters once we predict the proper character
- Pick some input sequence to translate, then run it through the encoder, obtaining the states
- Send the states and the <SOS> character, ' ', to the decoder.
- Loop, getting each next character, until the decoder generates an <EOS> or ' '