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.0.tar.gz (6.7 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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: precis_summary-0.2.0.tar.gz
  • Upload date:
  • Size: 6.7 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.0.tar.gz
Algorithm Hash digest
SHA256 1f1a40028b3de2e107a7381cd0914f51223639c153b85896be2da638e34d651f
MD5 7d7ee08748557b4752447be1b07f288d
BLAKE2b-256 e62e0bea7afd93d4b8eab42136e4def0c6357cc9abc61040ab7a553247831f0b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: precis_summary-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3dc13182feab601c52ec909e363b1dc254287106fb93d74d8cc4ddd4f4de9a1
MD5 cfeea362384dbe1a50755ac1765e343f
BLAKE2b-256 10ad2a10640d030da095199b468a6abc1c230cfec36a86b9ec4f78f2dc806833

See more details on using hashes here.

Provenance

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