================
summa – textrank
================
TextRank implementation for text summarization and keyword extraction in Python 3,
with `optimizations on the similarity function <https://arxiv.org/pdf/1602.03606.pdf>`_.
Features
--------
* Text summarization
* Keyword extraction
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
summarization
writing
account
Note that line breaks in the input will be used as sentence separators, so be sure
to preprocess your text accordingly.
Installation
------------
This software is `available in PyPI <https://pypi.org/project/summa/>`_.
It depends on `NumPy <http://www.numpy.org/>`_ and `Scipy <https://www.scipy.org/>`_,
two Python libraries for scientific computing.
Pip will automatically install them along with `summa`::
pip install summa
For a better performance of keyword extraction, install `Pattern <http://www.clips.ua.ac.be/pattern>`_.
More examples
-------------
- Command-line usage::
textrank -t FILE
- Define length of the summary as a proportion of the text (also available in :code:`keywords`)::
>>> from summa.summarizer import summarize
>>> summarize(text, ratio=0.2)
- Define length of the summary by aproximate number of words (also available in :code:`keywords`)::
>>> summarize(text, words=50)
- Define input text language (also available in :code:`keywords`).
The available languages are arabic, danish, dutch, english, finnish, french, german,
hungarian, italian, norwegian, polish, porter, portuguese, romanian, russian,
spanish and swedish::
>>> summarize(text, language='spanish')
- Get results as a list (also available in :code:`keywords`)::
>>> summarize(text, split=True)
['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.']
References
-------------
- Mihalcea, R., Tarau, P.:
`"Textrank: Bringing order into texts" <http://www.aclweb.org/anthology/W04-3252>`__.
In: Lin, D., Wu, D. (eds.)
Proceedings of EMNLP 2004. pp. 404–411. Association for Computational Linguistics,
Barcelona, Spain. July 2004.
- Barrios, F., López, F., Argerich, L., Wachenchauzer, R.:
`"Variations of the Similarity Function of TextRank for Automated Summarization" <https://arxiv.org/pdf/1602.03606.pdf>`__.
Anales de las 44JAIIO.
Jornadas Argentinas de Informática, Argentine Symposium on Artificial Intelligence, 2015.
To cite this work::
@article{DBLP:journals/corr/BarriosLAW16,
author = {Federico Barrios and
Federico L{\'{o}}pez and
Luis Argerich and
Rosa Wachenchauzer},
title = {Variations of the Similarity Function of TextRank for Automated Summarization},
journal = {CoRR},
volume = {abs/1602.03606},
year = {2016},
url = {http://arxiv.org/abs/1602.03606},
archivePrefix = {arXiv},
eprint = {1602.03606},
timestamp = {Wed, 07 Jun 2017 14:40:43 +0200},
biburl = {https://dblp.org/rec/bib/journals/corr/BarriosLAW16},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
-------------
Summa is open source software released under the `The MIT License (MIT) <http://opensource.org/licenses/MIT>`_.
Copyright (c) 2014 – now Summa NLP.
Raw data
{
"_id": null,
"home_page": "https://github.com/summanlp/textrank",
"name": "summa",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.4",
"maintainer_email": "",
"keywords": "summa,nlp,summarization,NLP,natural language processing,automatic summarization,keywords,summary,textrank,pagerank",
"author": "Federico Barrios, Federico Lopez",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/45/3b/1c7dc435d05aef474c4137328400f1e11787b9bffab1f87a3f160c1fef54/summa-1.2.0.tar.gz",
"platform": "",
"description": "================\nsumma \u2013 textrank\n================\n\nTextRank implementation for text summarization and keyword extraction in Python 3,\nwith `optimizations on the similarity function <https://arxiv.org/pdf/1602.03606.pdf>`_.\n\n\nFeatures\n--------\n\n* Text summarization\n* Keyword extraction\n\nExamples\n--------\n\nText summarization::\n\n >>> text = \"\"\"Automatic summarization is the process of reducing a text document with a \\\n computer program in order to create a summary that retains the most important points \\\n of the original document. As the problem of information overload has grown, and as \\\n the quantity of data has increased, so has interest in automatic summarization. \\\n Technologies that can make a coherent summary take into account variables such as \\\n length, writing style and syntax. An example of the use of summarization technology \\\n is search engines such as Google. Document summarization is another.\"\"\"\n\n >>> from summa import summarizer\n >>> print(summarizer.summarize(text))\n 'Automatic summarization is the process of reducing a text document with a computer\n program in order to create a summary that retains the most important points of the\n original document.'\n\n\nKeyword extraction::\n\n >>> from summa import keywords\n >>> print(keywords.keywords(text))\n document\n summarization\n writing\n account\n\n\nNote that line breaks in the input will be used as sentence separators, so be sure\nto preprocess your text accordingly.\n\nInstallation\n------------\n\nThis software is `available in PyPI <https://pypi.org/project/summa/>`_.\nIt depends on `NumPy <http://www.numpy.org/>`_ and `Scipy <https://www.scipy.org/>`_,\ntwo Python libraries for scientific computing.\nPip will automatically install them along with `summa`::\n\n pip install summa\n\nFor a better performance of keyword extraction, install `Pattern <http://www.clips.ua.ac.be/pattern>`_.\n\n\nMore examples\n-------------\n\n- Command-line usage::\n\n textrank -t FILE\n\n- Define length of the summary as a proportion of the text (also available in :code:`keywords`)::\n\n >>> from summa.summarizer import summarize\n >>> summarize(text, ratio=0.2)\n\n- Define length of the summary by aproximate number of words (also available in :code:`keywords`)::\n\n >>> summarize(text, words=50)\n\n- Define input text language (also available in :code:`keywords`).\n\n The available languages are arabic, danish, dutch, english, finnish, french, german,\n hungarian, italian, norwegian, polish, porter, portuguese, romanian, russian,\n spanish and swedish::\n\n\n >>> summarize(text, language='spanish')\n\n- Get results as a list (also available in :code:`keywords`)::\n\n >>> summarize(text, split=True)\n ['Automatic summarization is the process of reducing a text document with a\n computer program in order to create a summary that retains the most important\n points of the original document.']\n\n\nReferences\n-------------\n- Mihalcea, R., Tarau, P.:\n `\"Textrank: Bringing order into texts\" <http://www.aclweb.org/anthology/W04-3252>`__.\n In: Lin, D., Wu, D. (eds.)\n Proceedings of EMNLP 2004. pp. 404\u2013411. Association for Computational Linguistics,\n Barcelona, Spain. July 2004.\n\n- Barrios, F., L\u00f3pez, F., Argerich, L., Wachenchauzer, R.:\n `\"Variations of the Similarity Function of TextRank for Automated Summarization\" <https://arxiv.org/pdf/1602.03606.pdf>`__.\n Anales de las 44JAIIO.\n Jornadas Argentinas de Inform\u00e1tica, Argentine Symposium on Artificial Intelligence, 2015.\n\n\nTo cite this work::\n\n @article{DBLP:journals/corr/BarriosLAW16,\n author = {Federico Barrios and\n Federico L{\\'{o}}pez and\n Luis Argerich and\n Rosa Wachenchauzer},\n title = {Variations of the Similarity Function of TextRank for Automated Summarization},\n journal = {CoRR},\n volume = {abs/1602.03606},\n year = {2016},\n url = {http://arxiv.org/abs/1602.03606},\n archivePrefix = {arXiv},\n eprint = {1602.03606},\n timestamp = {Wed, 07 Jun 2017 14:40:43 +0200},\n biburl = {https://dblp.org/rec/bib/journals/corr/BarriosLAW16},\n bibsource = {dblp computer science bibliography, https://dblp.org}\n }\n\n\n-------------\n\nSumma is open source software released under the `The MIT License (MIT) <http://opensource.org/licenses/MIT>`_.\n\nCopyright (c) 2014 \u2013 now Summa NLP.",
"bugtrack_url": null,
"license": "",
"summary": "A text summarization and keyword extraction package based on TextRank",
"version": "1.2.0",
"project_urls": {
"Download": "https://github.com/summanlp/textrank/releases",
"Homepage": "https://github.com/summanlp/textrank"
},
"split_keywords": [
"summa",
"nlp",
"summarization",
"nlp",
"natural language processing",
"automatic summarization",
"keywords",
"summary",
"textrank",
"pagerank"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "453b1c7dc435d05aef474c4137328400f1e11787b9bffab1f87a3f160c1fef54",
"md5": "7f3975077331a512524136c17663f896",
"sha256": "6eb60e4e3d3859e7d951f36a3515573becf096ca404ae806a2f1e8fa7a53a0fc"
},
"downloads": -1,
"filename": "summa-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "7f3975077331a512524136c17663f896",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.4",
"size": 54913,
"upload_time": "2019-01-16T22:12:13",
"upload_time_iso_8601": "2019-01-16T22:12:13.723563Z",
"url": "https://files.pythonhosted.org/packages/45/3b/1c7dc435d05aef474c4137328400f1e11787b9bffab1f87a3f160c1fef54/summa-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2019-01-16 22:12:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "summanlp",
"github_project": "textrank",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "scipy",
"specs": [
[
">=",
"1.0.0"
]
]
}
],
"lcname": "summa"
}