README.md

Travis-CI Build Status Coverage Status CRAN_Status_Badge license

Rsmmry

SMMRY offers a service to automatically summarize a webpage or simply text. Rsmmry allows to access this service from within R.

Could be useful in combination with packages like antiword or tm that allow text mining.

Installation

Rsmmry is currently not on CRAN, but you can use devtools to install the development version. To do so:

if(!require('devtools')) install.packages('devtools')
library(devtools)
install_github('nevrome/Rsmmry')

Usage

To use Rsmmry you first of all need a SMMRY API Key (http://smmry.com/api) that has to be set as a environment variable SMMRY_PAT.

With this done, you can call the main function smmry_api() to summarize text or a website.

lorem_ipsum <- "Lorem ipsum dolor sit amet, consetetur 
                sadipscing elitr, sed diam nonumy eirmod 
                tempor invidunt ut labore et dolore magna 
                aliquyam erat, sed diam voluptua. At vero 
                eos et accusam et justo duo dolores et ea 
                rebum. Stet clita kasd gubergren, no sea 
                takimata sanctus est Lorem ipsum dolor sit 
                amet. Lorem ipsum dolor sit amet, consetetur 
                sadipscing elitr, sed diam nonumy eirmod 
                tempor invidunt ut labore et dolore magna 
                aliquyam erat, sed diam voluptua. At vero 
                eos et accusam et justo duo dolores et ea 
                rebum. Stet clita kasd gubergren, no sea 
                takimata sanctus est Lorem ipsum dolor sit 
                amet."

testurl <- "https://en.wikipedia.org/wiki/Aregund"

smmry_api(x = lorem_ipsum)
smmry_api(x = testurl)

The package provides a RStudio Addin named rsmmry that binds to smmry_api() to summarize text (or homepages) in the clipboard. smmry_api() can therefore be called with a keyboard shortcut in RStudio.

Licence

Rsmmry is released under the GNU General Public Licence, version 2. Comments and feedback are welcome, as are code contributions.

I'm not affiliated with the the team behind SMMRY - I just wanted to provide a convinient way to use their API.



nevrome/Rsmmry documentation built on May 23, 2019, 4:27 p.m.