You can get the stable version from CRAN:
install.packages("slowraker")Or the development version from GitHub:
if (!"devtools" %in% rownames(installed.packages()))
install.packages("devtools")
devtools::install_github("crew102/slowraker")There is one main function in the slowraker package - slowrake(). slowrake() extracts keywords from a vector of documents using the RAKE algorithm. This algorithm doesn’t require any training data, so it’s super easy to use:
library(slowraker)
data("dog_pubs")
rakelist <- slowrake(txt = dog_pubs$abstract[1:5])slowrake() outputs a list of data frames. Each data frame contains the keywords that were extracted for a given document:
rakelist
#>
#> # A rakelist containing 5 data frames:
#> $ :'data.frame': 61 obs. of 4 variables:
#> ..$ keyword:"assistance dog identification tags" ...
#> ..$ freq :1 1 ...
#> ..$ score :11 ...
#> ..$ stem :"assist dog identif tag" ...
#> $ :'data.frame': 88 obs. of 4 variables:
#> ..$ keyword:"current dog suitability assessments focus" ...
#> ..$ freq :1 1 ...
#> ..$ score :21 ...
#> ..$ stem :"current dog suitabl assess focu" ...
#> #...With 3 more data frames.You can bind these data frames together using rbind_rakelist():
rbind_rakelist(rakelist, doc_id = dog_pubs$doi[1:5])One this site you will find:
slowrake()
slowraker called rapidraker