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.3.tar.gz (10.0 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.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for precis_summary-0.2.3.tar.gz
Algorithm Hash digest
SHA256 73009e7e930dfe6f345a5076520dd8d0b868303bd30ebce0a16b812a44b7f832
MD5 9c54248bf11b42a386b91359127e8b4a
BLAKE2b-256 b981d7f1acf8dc7c09d92c5c2406913550b995f9efae6eb021887f366804cd4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_summary-0.2.3.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.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for precis_summary-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ddbfee288beac06194e2dbc1bf2c6a9cb515f7115bac76ac500c60da66ad643b
MD5 5fb79ab68095927bb502fee2295b3014
BLAKE2b-256 fa26251e486357566ed45b4e418f2cce76774a29e56f7e1ce9c984ab6749ee34

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_summary-0.2.3-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