sumy
Module for automatic summarization of text documents and HTML pages.
What it is and what it does
Sumy is a Python library for automatic text summarization that works with both HTML pages and plain text. It implements multiple summarization algorithms—LSA, LexRank, Luhn, and Edmundson—allowing you to choose the approach that fits your use case. The package includes a command-line tool for quick summarization tasks and an evaluation framework to measure summary quality against reference texts.
The library handles multilingual content and provides tokenizers for language-specific processing. It depends on nltk for natural language processing, lxml-html-clean for HTML parsing, requests for fetching web content, and breadability for content extraction. You can use it as a library in your Python code or invoke it from the command line, making it flexible for both programmatic and ad-hoc summarization tasks.
Use it for:
- Summarize web articles or Wikipedia pages to extract key information without manual reading.
- Build a bot that automatically generates TL;DR summaries for forum discussions or social media posts.
- Reduce large document collections to key sentences for quick review or archival purposes.
- Evaluate the quality of generated summaries against reference texts using built-in evaluation methods.
- Integrate multilingual summarization into applications serving non-English-speaking users.
- Extract summaries from video transcripts or meeting notes by parsing plain text output.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sumy extracts summaries from HTML pages or plain text using multiple automatic summarization algorithms (LSA, LexRank, Luhn, Edmundson) and provides evaluation tools for summary quality.
Yes. Sumy is actively maintained, has no known vulnerabilities, low install friction, and a permissive Apache License, Version 2.0. It offers multiple summarization algorithms and multilingual support, making it suitable for both simple summarization tasks and more complex NLP pipelines. The recent release and strong GitHub presence indicate ongoing development and community use.
Install
sumy on PyPI
pip
pip install sumyuv
uv add sumypoetry
poetry add sumyInstalling sumy
Before you install
Low friction install with 7 runtime dependencies including nltk, lxml-html-clean, and requests. Package is actively maintained with a recent release 2 days ago and 3701 GitHub stars. Supports Python 3.8 through 3.14.
License in practice
Licensed under Apache License, Version 2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install sumy
from sumy.parsers.html import HtmlParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.lsa import LsaSummarizer
from sumy.utils import get_stop_words
parser = HtmlParser.from_url("https://example.com", Tokenizer("english"))
summarizer = LsaSummarizer()
summarizer.stop_words = get_stop_words("english")
for sentence in summarizer(parser.document, 10):
print(sentence)
Requires Python 3.8+; nltk and lxml-html-clean are compiled/system-dependent dependencies that may need additional setup on some platforms.
Verify before relying
- Whether all listed natural languages are fully supported or require additional tokenizer configuration.
- Performance characteristics and memory usage for large documents or batch processing.
- Accuracy or ROUGE scores for the implemented summarization algorithms relative to alternatives.
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — breadability, docopt-ng, lxml-html-clean, nltk, pycountry, requests, setuptools |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 173,532/month — #10,305 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sumy-0.13.0-py3-none-any.whl
Keywords: LSA, LexRank, NLP, TextRank, automatic summarization, data mining, data reduction, latent semantic analysis, natural language processing, web-data extraction
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
jusTextjusText removes boilerplate content…
permissive · top 5,000 on PyPI
pytextrankPyTextRank implements graph-based TextRank and…
permissive · top 15,000 on PyPI
semantic-text-splitterSplits long text into semantically meaningful…
permissive · top 15,000 on PyPI
rouge-chineseComputes ROUGE evaluation metrics for Chinese…
unclear · top 15,000 on PyPI
rougeComputes ROUGE scores (Recall-Oriented…
unclear · top 5,000 on PyPI
readabilipyExtracts article content from HTML using either…
permissive · top 5,000 on PyPI
textacytextacy extends spaCy's NLP capabilities with…
permissive · top 15,000 on PyPI
gensimGensim is a Python library for topic modeling,…
copyleft · top 5,000 on PyPI
rouge-metricComputes ROUGE metrics (ROUGE-N, ROUGE-L,…
permissive · top 15,000 on PyPI
parselParsel extracts data from HTML, JSON, and XML…
permissive · top 5,000 on PyPI