Data: The dataset is downloaded from metatext nlp database.
Steps involved:
-
Preprocess the data.
-
Tokenizing and padding the sequences to use them easily.
-
Implementing custom layers, custom models, custom loss function and custom data generator.
-
First a simple encoder decoder model is built.
-
Reference is taken from https://arxiv.org/abs/1409.0473 (Neural Machine Translation By Jointly Learning To Align And Translate) and attention mechanism is applied to improve the simple encoder decoder model to work properly for longer sentences.
-
Two types of attention mechanism are applied: a) Attention using dot. b) Attention using general mechanism.
-
Got a BLEU score of 0.72 on simple model and 0.85 on attention models.