-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.Rmd
76 lines (55 loc) · 1.79 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: "slowraker"
output: github_document
---
```{r, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
progress = FALSE,
error = FALSE,
message = FALSE,
warning = FALSE
)
```
<br>
## Installation
You can get the stable version from CRAN:
```r
install.packages("slowraker")
```
Or the development version from GitHub:
```r
if (!"devtools" %in% rownames(installed.packages()))
install.packages("devtools")
devtools::install_github("crew102/slowraker")
```
## Basic usage
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:
```{r, eval = FALSE}
library(slowraker)
data("dog_pubs")
rakelist <- slowrake(txt = dog_pubs$abstract[1:5])
```
```{r, eval = TRUE, results = 'hide', echo = FALSE}
# Note, we have to split the README.Rmd up like this so that it doesn't print
# the progress bar.
library(slowraker)
options(width = 100, digits = 2)
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:
```{r}
rakelist
```
You can bind these data frames together using `rbind_rakelist()`:
```{r}
rbind_rakelist(rakelist, doc_id = dog_pubs$doi[1:5])
```
## Learning more
One this site you will find:
* A [getting started](articles/getting-started.html) vignette that explains how RAKE works as well as the basics of `slowrake()`
* A few example [applications](articles/applications.html)
* An introduction to a faster version of `slowraker` called [rapidraker](articles/rapidraker.html)
* Answers to [frequently asked questions](articles/faqs.html)