📝 This is a Python program that summarizes text using Natural Language Processing (NLP) techniques.
Here are some features of the text summarizer:
- Automatic Language Detection: The program can automatically detect the language of the input text.
- Summarize by Language: You can choose to summarize the text based on the detected language or provide a language preference.
- Customizable Number of Sentences: You can specify the number of sentences to include in the summary.
- Word Frequency Analysis: The program uses word frequencies to score and select the most important sentences for the summary.
- Summary Statistics: The program provides statistics on the number of original words, summary words, and the percentage reduction in text size.
- Run the program using python sum.py.
- Enter the text you want to summarize.
- Choose whether to summarize by language (automatic detection or preference).
- If not summarizing by language, provide a language preference and the number of sentences for the summary.
- View the generated summary and the summary statistics.
- Python 3.6+
- NLTK (Natural Language Toolkit)
- langdetect
- colorama
-
Clone this repository.
-
Install the required dependencies using pip:
pip install -r requirements.txt
-
Run the program:
python sum.py
🚀 Feel free to use this code, edit, fork or whatever!