All Projects → summanlp → Textrank

summanlp / Textrank

Licence: mit
TextRank implementation for Python 3.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Textrank

Pythonrouge
Python wrapper for evaluating summarization quality by ROUGE package
Stars: ✭ 155 (-84.62%)
Mutual labels:  natural-language-processing, text-summarization, summarization
Text summarization with tensorflow
Implementation of a seq2seq model for summarization of textual data. Demonstrated on amazon reviews, github issues and news articles.
Stars: ✭ 226 (-77.58%)
Mutual labels:  natural-language-processing, text-summarization, summarization
Neusum
Code for the ACL 2018 paper "Neural Document Summarization by Jointly Learning to Score and Select Sentences"
Stars: ✭ 143 (-85.81%)
Mutual labels:  natural-language-processing, summarization
Summarization Papers
Summarization Papers
Stars: ✭ 238 (-76.39%)
Mutual labels:  natural-language-processing, summarization
nlp-akash
Natural Language Processing notes and implementations.
Stars: ✭ 66 (-93.45%)
Mutual labels:  text-summarization, summarization
Pytextrank
Python implementation of TextRank for phrase extraction and summarization of text documents
Stars: ✭ 1,675 (+66.17%)
Mutual labels:  natural-language-processing, summarization
Discobert
Code for paper "Discourse-Aware Neural Extractive Text Summarization" (ACL20)
Stars: ✭ 120 (-88.1%)
Mutual labels:  natural-language-processing, text-summarization
Transformersum
Models to perform neural summarization (extractive and abstractive) using machine learning transformers and a tool to convert abstractive summarization datasets to the extractive task.
Stars: ✭ 107 (-89.38%)
Mutual labels:  text-summarization, summarization
PlanSum
[AAAI2021] Unsupervised Opinion Summarization with Content Planning
Stars: ✭ 25 (-97.52%)
Mutual labels:  text-summarization, summarization
Entity2Topic
[NAACL2018] Entity Commonsense Representation for Neural Abstractive Summarization
Stars: ✭ 20 (-98.02%)
Mutual labels:  text-summarization, summarization
gazeta
Gazeta: Dataset for automatic summarization of Russian news / Газета: набор данных для автоматического реферирования на русском языке
Stars: ✭ 25 (-97.52%)
Mutual labels:  text-summarization, summarization
Unified Summarization
Official codes for the paper: A Unified Model for Extractive and Abstractive Summarization using Inconsistency Loss.
Stars: ✭ 114 (-88.69%)
Mutual labels:  natural-language-processing, summarization
Nlp Papers
Papers and Book to look at when starting NLP 📚
Stars: ✭ 111 (-88.99%)
Mutual labels:  natural-language-processing, summarization
Files2rouge
Calculating ROUGE score between two files (line-by-line)
Stars: ✭ 120 (-88.1%)
Mutual labels:  natural-language-processing, summarization
Text Analytics With Python
Learn how to process, classify, cluster, summarize, understand syntax, semantics and sentiment of text data with the power of Python! This repository contains code and datasets used in my book, "Text Analytics with Python" published by Apress/Springer.
Stars: ✭ 1,132 (+12.3%)
Mutual labels:  natural-language-processing, text-summarization
Paper Reading
Paper reading list in natural language processing, including dialogue systems and text generation related topics.
Stars: ✭ 508 (-49.6%)
Mutual labels:  natural-language-processing, text-summarization
DocSum
A tool to automatically summarize documents abstractively using the BART or PreSumm Machine Learning Model.
Stars: ✭ 58 (-94.25%)
Mutual labels:  text-summarization, summarization
TextRank-node
No description or website provided.
Stars: ✭ 21 (-97.92%)
Mutual labels:  text-summarization, summarization
Awesome Text Summarization
The guide to tackle with the Text Summarization
Stars: ✭ 990 (-1.79%)
Mutual labels:  natural-language-processing, text-summarization
Budou
Budou is an automatic organizer tool for beautiful line breaking in CJK (Chinese, Japanese, and Korean).
Stars: ✭ 971 (-3.67%)
Mutual labels:  natural-language-processing

================ 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].