An open API service indexing awesome lists of open source software.

https://github.com/fork123aniket/abstractive-text-summarization

Implementation of an Attention-based LSTM Encoder-Decoder Approach for Abstractive Text Summarization
https://github.com/fork123aniket/abstractive-text-summarization

abstractive-text-summarization encoder-decoder encoder-decoder-attention encoder-decoder-model keras natural-language-processing nltk nltk-python stacked-lstm tensorflow text-summarization

Last synced: 2 months ago
JSON representation

Implementation of an Attention-based LSTM Encoder-Decoder Approach for Abstractive Text Summarization

Awesome Lists containing this project

README

        

# Abstractive Text Summarization

This repository aims at providing ***Stacked LSTM-based Encoder-Decoder*** implementation for ***Abstactive Text Summarization*** task, which generates new relevant sentence as summary for each input (original text in the form of longer paragraphs).
This task has many applications:-
- Entity timelines - Given an entity and a time period, provide a summary of the most memorable events involving this entity.
- Sentence Compression - Given a sentence, generate a shorter one while preserving the essential contextual information.
- Summarization of User Generated Content - Identify main aspects and summarize for machine or user consumption.

## Requirements
- `Tensorflow`
- `keras`
- `NLTK`
- `NumPy`
- `Pandas`
- `Matplotlib`

## Usage
### Data
- The developed model is trained on the ***Amazon Fine Food reviews*** dataset, which can be downloaded from [***here***](https://www.kaggle.com/snap/amazon-fine-food-reviews).
- The data spans a period of more than 10 years, including all ~500,000 reviews up to October 2012.
- These reviews include product and user information, ratings, plain text review, and summary.
- It also includes reviews from all other Amazon categories.
### Training and Testing
To train the model and generate summary for each new test paragraph, run `Abstractive_Text_Summarization.py`.

## Results
Following are a few summaries generated by the model:-

```
Review: aware decaf coffee although showed search decaf cups intended purchase gift kept recipient drink caffeine favorite means
Original summary: not decaf
Predicted summary: decaf decaf
```

```
Review: first time using fondarific fondant general one really easy use baby shower cake worked indicated also colored made two tier cake final product looked great greasy
Original summary: easy to use
Predicted summary: great product
```

```
Review: size quite good dog training smell strong cannot put open bag must seal everytime gave treat otherwise dog stand trying fetch believe taste great puppy purchase sure
Original summary: strong smell and my puppy loves it
Predicted summary: my dog loves these
```

```
Review: daughter drinking since months old months old still loves snack time healthy delicious great addition menu
Original summary: great snack
Predicted summary: great snack
```

```
Review: love stuff great store bought homemade baked goods kicking things professional level works colored dark light frosting also used dusting powdered sugar pretty fine texture
Original summary: fun like dust
Predicted summary: perfect
```