Here NEWS SUMMARY dataset is used to create an abstractive text summarizer
model. Also to speed up the learning process GloVe 6B for the pretrained word embedding.
The notebook also contains the preprocessing
stage for NLP
tasks using Tensorflow2 the later processing in preprocessing
stage covers efficient way for processing text data for encoder
and decoder
architecture.
The notebook is available on Kaggle to work in the same environment where this notebook was created i.e. use the same version packages used, etc...
The dataset has 100,258 examples and the model created here is trained using TPU
.
There 3 different training models used here
build_seq2seq_model_with_just_lstm
- Seq2Seq model with just LSTMs. Bothencoder
anddecoder
have justLSTM
s.build_seq2seq_model_with_bidirectional_lstm
- Seq2Seq model with Bidirectional LSTMs. Bothencoder
anddecoder
haveBidirectional LSTM
s.build_hybrid_seq2seq_model
- Seq2Seq model with hybrid architecture. Hereencoder
hasBidirectional LSTM
s whiledecoder
has justLSTM
s.
Also the inference
methods and decode_sequence
methods for all the 3 models are there.
The model (the trained model)
, encoder_model (for inference)
and decoder_model (for inference)
for Seq2Seq with just LSTMs are only saved and can be found in this project's Kaggle's kernel.
Although models for Seq2Seq with just LSTMs are saved, the notebook has all the 3 models trained, inferred and are used make predictions.
The tokenizers for headlines
and text
(columns of the dataset) are also saved and can be found in this project's Kaggle's kernel.
The processed dataset
for this projects is also saved in this project's Kaggle's kernel
New headlines wordcloud
New news text wordcloud
Word distribution for headlines and text
Model's accuracy curve
Model's loss curve
Predictions
Model's accuracy curve
Model's loss curve
Predictions
Model's accuracy curve
Model's loss curve
Predictions