Description Usage Arguments Value Examples
Performs text sampling. Requires input data in the form of raw texts.
1 2 3 4 |
n |
Number of texts to be sampled. |
source |
Text source. A vector of characters, a |
type |
Type of texts to be sampled. Possible values are texts, paragraphs, sentences, words, and characters. |
sub_token |
A string specifying the text unit for filtering texts by length via |
max_length |
Maximum length of the texts to be sampled. |
min_length |
Minimum length of the texts to be sampled. |
word_list |
A word list. |
shuffle |
If |
input |
A string defining the column name of the raw text data in |
tbl |
If |
clean |
If |
... |
Additional parameters passed to function for e.g. preprocessing. |
An object of class data.frame
.
1 2 | # Sample three sentences from Yelp reviews.
sample_text(n = 3, source = "yelp_sentences", type = "sentences")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.