The 'textrank' algorithm is an extension of the 'Pagerank' algorithm for text. The algorithm allows to summarize text by calculating how sentences are related to one another. This is done by looking at overlapping terminology used in sentences in order to set up links between sentences. The resulting sentence network is next plugged into the 'Pagerank' algorithm which identifies the most important sentences in your text and ranks them. In a similar way 'textrank' can also be used to extract keywords. A word network is constructed by looking if words are following one another. On top of that network the 'Pagerank' algorithm is applied to extract relevant words after which relevant words which are following one another are combined to get keywords. More information can be found in the paper from Mihalcea, Rada & Tarau, Paul (2004) < http://www.aclweb.org/anthology/W04-3252>.
This repository contains an R package which handles summarizing text by using textrank.
For ranking sentences, this algorithm basically consists of.
For finding keywords, this algorithm basically consists of.
The package is available under the Mozilla Public License Version 2.0. Installation can be done as follows. Please visit the package documentation and package vignette for further details.
install.packages("textrank") vignette("textrank", package = "textrank")
For installing the development version of this package:
devtools::install_github("bnosac/textrank", build_vignettes = TRUE)
Need support in text mining? Contact BNOSAC: http://www.bnosac.be