Skip to main content

Fast extractive summarization via RAKE keyword extraction

Project description

precis-summary

Fast extractive summarization via RAKE keyword extraction. Zero dependencies.

Usage

from precis_summary import telegram_precis, pick_best_summary

# RAKE keyword extraction (~5ms, zero deps)
text = "Metal-organic frameworks exhibit high CO2 adsorption capacity..."
precis = telegram_precis(text)
# → "Metal-organic frameworks; high CO2 adsorption capacity; ..."

# Pick best summary from a multi-profile dict
summaries = {
    "rake": "Metal-organic frameworks; high CO2 adsorption",
    "llm:qwen3.5:9b": "MOFs show 3x CO2 uptake vs zeolites; amine-functionalized variants optimal",
}
best = pick_best_summary(summaries)
# → "MOFs show 3x CO2 uptake vs zeolites; amine-functionalized variants optimal"

Summary ranking

pick_best_summary() uses prefix-priority matching:

  1. llm:* — any LLM-generated summary (best quality)
  2. rake — extractive RAKE keyphrases (instant, always available)
  3. Fallback — first non-empty value

Ranking lives in code, not in the data. New summary methods are added by extending SUMMARY_PRIORITY in ranking.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

precis_summary-0.2.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

precis_summary-0.2.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file precis_summary-0.2.1.tar.gz.

File metadata

  • Download URL: precis_summary-0.2.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for precis_summary-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cc53a31b319bc1f5e0e7b0dd2c4ceaec72a826461d502041b7f428b3ccc79d0a
MD5 6e08d9bac01699a567a326f32e0eeacf
BLAKE2b-256 e66c51665abeed4e53563023b69aad2f0a49fe43a437f25cc10532fec9d4ccac

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_summary-0.2.1.tar.gz:

Publisher: publish.yml on retospect/precis-summary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file precis_summary-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: precis_summary-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for precis_summary-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c3aef3299246f5da62329f0fa1a4a57997e838ba61af8a13a96f4e3ad684d60
MD5 78fdb4595ad20706c35d6332a6b58db5
BLAKE2b-256 ef18b8e0ebfab66462eaba3ffc23163fe1270082f128d6672cac30d9c7389ed8

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_summary-0.2.1-py3-none-any.whl:

Publisher: publish.yml on retospect/precis-summary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page