/TextSumNLP

"A Python program that summarizes text using Natural Language Processing (NLP) techniques."

Primary LanguagePython

Text Summarizer

📝 This is a Python program that summarizes text using Natural Language Processing (NLP) techniques.

Features

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.

Usage

  1. Run the program using python sum.py.
  2. Enter the text you want to summarize.
  3. Choose whether to summarize by language (automatic detection or preference).
  4. If not summarizing by language, provide a language preference and the number of sentences for the summary.
  5. View the generated summary and the summary statistics.

Requirements

  • Python 3.6+
  • NLTK (Natural Language Toolkit)
  • langdetect
  • colorama

Installation

  1. Clone this repository.

  2. Install the required dependencies using pip:

    pip install -r requirements.txt
  3. Run the program:

    python sum.py

🚀 Feel free to use this code, edit, fork or whatever!