Sumy — Automatic Text Summarization
Python library with 7 summarization algorithms (LSA, Luhn, Lex Rank, TextRank) for documents and HTML pages.
Sumy — Automatic Text Summarization
Sumy is a Python module and CLI for extractive text summarization, implementing seven proven algorithms: LSA, Luhn, Edmundson, Lex Rank, TextRank, SumBasic, and KL-Sum. Works on raw text, HTML, or plain URLs — no LLM required.
Key features
- 7 summarization algorithms; easily swap to compare quality
- Supports HTML page input (strips boilerplate automatically)
- Multi-language support via NLTK tokenizers (30+ languages)
- CLI for quick prototyping; Python API for pipelines
- Zero API calls — fully local, no rate limits or cost
Quick start
pip install sumy
# Summarize a URL with LexRank in 5 sentences
sumy lex-rank --url https://en.wikipedia.org/wiki/Artificial_intelligence --sentences 5
from sumy.parsers.html import HtmlParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.lex_rank import LexRankSummarizer
parser = HtmlParser.from_url("https://example.com/article", Tokenizer("english"))
summarizer = LexRankSummarizer()
for sentence in summarizer(parser.document, sentences_count=5):
print(sentence)
npx ai-supply add sumy-text-summarization
Curated mirror of the open-source Sumy (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/sumy-text-summarization/check). Click a policy:
Consume Sumy — Automatic Text Summarization programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/sumy-text-summarization
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/sumy-text-summarization/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add sumy-text-summarization
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/sumy-text-summarization/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "sumy-text-summarization" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.