Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TextRank implementation in Python.

License

NotificationsYou must be signed in to change notification settings

abiraja2004/textrank

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

221 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextRank implementation for text summarization and keyword extraction in Python.

Features

  • Text summarization
  • Keyword extraction

Examples

Text summarization:

>>> text = """Automatic summarization is the process of reducing a text document with acomputer program in order to create a summary that retains the most important pointsof the original document. As the problem of information overload has grown, and asthe quantity of data has increased, so has interest in automatic summarization.Technologies that can make a coherent summary take into account variables such aslength, writing style and syntax. An example of the use of summarization technologyis 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 computerprogram in order to create a summary that retains the most important points of theoriginal document.'

Keyword extraction:

>>> from summa import keywords>>> print(keywords.keywords(text))documentsummarizationwritingaccount

Installation

This software depends onNumPy and Scipy, two Python packages for scientific computing.Pip will automatically install them along with summa:

pip install summa

For a better performance of keyword extraction, installPattern

More examples

  • Command-line usage:

    textrank -t FILE
  • Define length of the summary as a proportion of the text (also available inkeywords):

    >>> from summa.summarizer import summarize>>> summarize(text, ratio=0.2)
  • Define length of the summary by aproximate number of words (also available inkeywords):

    >>> summarize(text, words=50)
  • Define input text language (also available inkeywords):

    >>> summarize(text, language='spanish')

The available languages are "danish", "dutch", "english", "finnish", "french", "german", "hungarian", "italian", "norwegian", "porter", "portuguese", "romanian", "russian", "spanish", "swedish"

  • Get results as a list (also available inkeywords):

    >>> summarize(text, split=True)['Automatic summarization is the process of reducing a text document with acomputer program in order to create a summary that retains the most importantpoints of the original document.']

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

About

TextRank implementation in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python100.0%

[8]ページ先頭

©2009-2026 Movatter.jp