Description Usage Arguments Examples
View source: R/prepare.R View source: R/prepare.R
Remove sparse words.
Remove sparse words.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | strip_sparse_terms(text)
## S3 method for class 'corpus'
strip_sparse_terms(text)
## S3 method for class 'documents'
strip_sparse_terms(text)
## S3 method for class 'document'
strip_sparse_terms(text)
strip_sparse_terms(text)
## S3 method for class 'corpus'
strip_sparse_terms(text)
## S3 method for class 'documents'
strip_sparse_terms(text)
## S3 method for class 'document'
strip_sparse_terms(text)
|
text |
An object inheriting of class |
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 | ## Not run:
init_textanalysis()
# build document
# must be lowercase
doc <- string_document("This is 1 document.")
# replaces in place!
strip_sparse_terms(doc)
get_text(doc)
## End(Not run)
## Not run:
init_textanalysis()
# build document
str <- paste0(
"This is a sentence.",
"This is another sentence."
)
doc <- string_document(str)
# replaces in place!
strip_sparse_terms(doc)
get_text(doc)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.