Skip to main content

A text summarization and keyword extraction package

Project description

TextRank implementation for text summarization and keyword extraction in Python

Features

  • Text summarization

  • Keyword extraction

  • Text modeling with graph and gexf exportation

Examples

Text summarization:

>>> text = "Automatic summarization is the process of reducing a text document with a
computer program in order to create a summary that retains the most important points
of the original document. As the problem of information overload has grown, and as
the quantity of data has increased, so has interest in automatic summarization.
Technologies that can make a coherent summary take into account variables such as
length, writing style and syntax. An example of the use of summarization technology
is search engines such as Google. Document summarization is another."

>>> from summa import summarizer
>>> print summarizer.summarize(text)
'Automatic summarization is the process of reducing a text document with a computer
program in order to create a summary that retains the most important points of the
original document.'

Keyword extraction:

>>> from summa import keywords
>>> print keywords.keywords(text)
document
automatic summarization
technologies
technology

Installation

This software depends on NumPy and Scipy, two Python packages for scientific computing. You must have them installed prior to installing summa:

pip install summa

If you are going to use the export function, you also need NetworkX. For a better performance of keyword extraction, install Pattern

This version has been tested under Python 2.7

More examples

Command-line usage:

cd path/to/folder/summa/
python textrank.py -t FILE

Export:

>>> from summa import export
>>> export.gexf_export(text, path="graph.gexf")

Summa is open source software released under the The MIT License (MIT). Copyright (c) 2014 - now Summa NLP

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

summa-0.0.5.tar.gz (38.5 kB view details)

Uploaded Source

File details

Details for the file summa-0.0.5.tar.gz.

File metadata

  • Download URL: summa-0.0.5.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for summa-0.0.5.tar.gz
Algorithm Hash digest
SHA256 249e6aee057f7b57da301b2ad0f8cbd19fbfea2776f2d27282d03f1405293181
MD5 5a6d44f1c1c5eac2b6b3992248da8ee0
BLAKE2b-256 131ce8ec27962184e4dc53cce662561e2348bcb2630a1a71d5daee9a39754efe

See more details on using hashes here.

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