This script is a Python implementation of a Text Summarizer. It automatically generates a summary of a given text.
- Rake: A Python implementation of the Rapid Automatic Keyword Extraction algorithm.
- WordCloud: A Python library for generating word clouds.
- NumPy: A Python library for the computation with arrays and matrices.
- Pandas: A Python library for data manipulation and analysis.
- Matplotlib: A Python library for creating visualizations in Python.
- NLTK: A Python library for natural language processing.
The script loads the text data from a file sample.txt
and generates a word cloud image of the text.
The script performs the following pre-processing steps on the text data:
- Elimination of punctuations
- Elimination of stopwords
- Creation of word frequency
The script generates a summary of the text using the following steps:
- Creation of sentence frequency
- Selection of top sentences based on sentence score
To use this script, you need to have the following libraries installed:
- Rake
- WordCloud
- NumPy
- Pandas
- Matplotlib
- NLTK
You also need to provide the text data in a file sample.txt
.
Run the script to generate the summary of the text. The summary will be displayed in the console.
Google colab file can be found here