Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple text summarizer built with the Flask web framework. It uses TF-IDF (Term Frequency-Inverse Document Frequency) to summarize text. Users can enter text through a web interface, and the application will generate a summary based on the input.

Notifications You must be signed in to change notification settings

codeasarjun/Textsummary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Text Summarizer ✨ TF-IDF Text Summarization πŸ“

This project implements a simple text summarizer using the Flask web framework. The summarization process is based on TF-IDF (Term Frequency-Inverse Document Frequency). Users can input text through a web interface, and the application generates a summary based on the provided input.

Project Structure β€’ app.py: The main file that contains the Flask application. β€’ CORE/text_summarizer.py: The module with the function for text summarization. β€’ templates/index.html: The HTML template for the web interface.

Dependencies

β€’ Flask: A micro web framework for Python.

β€’ NLTK: A natural language processing library.

β€’ scikit-learn: A machine learning library for Python.

Features πŸš€

TF-IDF Calculation πŸ”
The core functionality of the project revolves around calculating TF-IDF scores for words in the input text. TF-IDF scores help identify the significance of each word in the context of the entire document corpus.

Sentence Extraction πŸ“„ Using TF-IDF scores, the system extracts the most important sentences from the original text. These sentences encapsulate the essential information and contribute to the final summary. Installation

  1. Install the required Python packages: bashCopy code pip install Flask nltk scikit-learn
  2. Download NLTK data: pythonCopy code import nltk nltk.download('punkt') nltk.download('stopwords')
  3. Run the Flask application: bashCopy code python app.py
  4. Access the web interface at http://localhost:5000 in your browser. Usage
  5. Enter the text you want to summarize in the provided textarea.
  6. Optionally, specify the number of sentences for the summary.
  7. Click the "Summarize" button.
  8. View the original text and the generated summary.

Notes

β€’ This project uses a TF-IDF-based extractive summarization approach.
β€’ The summarization function is located in the CORE/text_summarizer.py file.
β€’ Adjust the parameters in the tfidf_summarize function for desired summarization length.

Future Improvements

β€’ Explore more advanced summarization methods, such as BERT-based models.
β€’ Enhance the user interface with additional features.

Output

About

A simple text summarizer built with the Flask web framework. It uses TF-IDF (Term Frequency-Inverse Document Frequency) to summarize text. Users can enter text through a web interface, and the application will generate a summary based on the input.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /