Skip to content

roshankhandelwal97/Text-Summarization-NLP

Repository files navigation

Text Summarization Project

Overview
This project encompasses both abstractive and extractive text summarization techniques using natural language processing (NLP) and deep learning. The goal is to condense large volumes of textual information into concise summaries, either by generating new sentences that represent the main ideas (abstractive) or by selecting and assembling key sentences based on similarity (extractive).


Abstractive Text Summarization

Description
This code implements abstractive text summarization using deep learning techniques, specifically employing a sequence-to-sequence model with attention mechanisms. Abstractive summarization involves generating new sentences to represent the main ideas of the original text. The provided code uses TensorFlow and Keras to build and train the summarization model on a dataset of reviews.

Installation Instructions
1.	Run the code in a Python environment with TensorFlow, Keras, NumPy, Pandas, and NLTK installed.
2.	Ensure access to the provided Reviews.csv file or replace it with your dataset.

Usage
1.	Load the necessary modules, including TensorFlow, Keras, NumPy, Pandas, and NLTK.
2.	Preprocess the data, including text cleaning, tokenization, and padding.
3.	Build and train the abstractive summarization model using a sequence-to-sequence architecture with attention.
4.	Evaluate the model and visualize the training/validation loss.
5.	Use the trained model to generate abstractive summaries for new text.

Features
•	Abstractive text summarization using a deep learning model with attention.
•	Tokenization, data preprocessing, and model building using TensorFlow and Keras.
•	Evaluation and visualization of model performance.

Dependencies
•	TensorFlow
•	Keras
•	NumPy
•	Pandas
•	NLTK (Natural Language Toolkit)

Data
•	Reviews.csv (Replace with your dataset if needed)

Important Notes
•	Abstractive summarization generates new sentences to summarize the input text.
•	The code uses deep learning techniques and attention mechanisms for improved summarization.


Extractive Text Summarization

Description
This code implements extractive text summarization using techniques such as sentence cleaning, lemmatization, and a ranking algorithm based on sentence similarity. Extractive summarization involves selecting and assembling key sentences from a text to create a concise summary. The provided code uses a similarity matrix and a damping factor to rank sentences, ultimately generating a summary by selecting the top-ranked sentences.

Installation Instructions
1.	Execute the code in a Python environment with NumPy, Pandas, and NLTK installed.
2.	Ensure the 'punkt', 'stopwords', and 'averaged_perceptron_tagger' NLTK packages are downloaded.

Usage
1.	Load the necessary modules, including NumPy, Pandas, and NLTK.
2.	Define the text to be summarized (s in the code).
3.	Tokenize sentences and perform sentence cleaning by removing punctuation, numbers, and special characters.
4.	Lemmatize the cleaned sentences to reduce words to their base form.
5.	Calculate the similarity matrix between sentences based on lemmatized words.
6.	Rank sentences using a damping factor and the similarity matrix.
7.	Sort and print the top-ranked sentences to create the extractive summary.

Features
•	Extractive text summarization using a similarity-based ranking algorithm.
•	NLTK for tokenization, stopword removal, and lemmatization.
•	Utilizes NumPy for matrix operations and Pandas for data manipulation.

Dependencies
•	NumPy
•	Pandas
•	NLTK (Natural Language Toolkit)

Data
No external data files are required. The text to be summarized is provided in the code.

Important Notes
•	Extractive summarization relies on sentence similarity and ranking.
•	The code uses NLTK for natural language processing tasks.
•	The resulting summary consists of the top-ranked sentences based on the ranking algorithm.

Contribution Guidelines
If you'd like to contribute to the project, please follow these guidelines:
1.	Fork the repository.
2.	Create a new branch for your feature or bug fix.
3.	Make your changes and submit a pull request.

Contact Information
Roshan Khandelwal (rokhande@syr.edu), Bhuvana Sri Likhitha Kanakam, Surya Chakra Mani Kuntha Sai Kapisetti, Murali Venkata Ratna Sai Gunnam
Under Prof. Lu Xiao(Syracuse University, NY) 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors