Description Usage Arguments Value Examples
A relatively slow version of the Rapid Automatic Keyword Extraction (RAKE)
algorithm. See Automatic keyword extraction from individual documents for
details on how RAKE works or read the "Getting started" vignette (
vignette("getting-started")
).
1 2 | slowrake(txt, stop_words = smart_words, stop_pos = c("VB", "VBD", "VBG",
"VBN", "VBP", "VBZ"), word_min_char = 3, stem = TRUE)
|
txt |
A character vector, where each element of the vector contains the text for one document. |
stop_words |
A vector of stop words which will be removed from your
documents. The default value ( |
stop_pos |
All words that have a part-of-speech (POS) that appears in
|
word_min_char |
The minimum number of characters that a word must have
to remain in the corpus. Words with fewer than |
stem |
Do you want to stem the words before running RAKE? |
An object of class rakelist
, which is just a list of data
frames (one data frame for each element of txt
). Each data frame
will have the following columns:
A keyword that was identified by RAKE.
The number of times the keyword appears in the document.
The keyword's score, as per the RAKE algorithm. Keywords with higher scores are considered to be higher quality than those with lower scores.
If you specified stem = TRUE
, you will get the
stemmed versions of the keywords in this column. When you choose stemming,
the keyword's score (score
) will be based off its stem,
but the reported number of times that the keyword appears (freq
)
will still be based off of the raw, unstemmed version of the keyword.
1 2 3 |
OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
# A rakelist containing 1 data frames:
$ :'data.frame': 2 obs. of 4 variables:
..$ keyword:"great keywords" ...
..$ freq :1 1
..$ score :4 1
..$ stem :"great keyword" ...
|
| | 0%
|
|=================================== | 50%
|
|======================================================================| 100%
# A rakelist containing 2 data frames:
$ :'data.frame': 4 obs. of 3 variables:
..$ keyword:"assistance dogs" ...
..$ freq :1 1 ...
..$ score :4 4 ...
$ :'data.frame': 7 obs. of 3 variables:
..$ keyword:"guide dog owners" ...
..$ freq :1 1 ...
..$ score :7.5 4.5 ...
Warning message:
system call failed: Cannot allocate memory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.