Stopwords | R Documentation |
Stopwords is for filter result.
print()
print method for Stopwords
objects
Stopwords$print(x, ...)
x
self
...
ignored
new()
Create a stopwords object for filter stopwords on analyze()
and tokenize()
results.
Stopwords$new(use_system_dict = TRUE)
use_system_dict
bool(optional)
: use system stopwords dictionary or not.
Defualt is TRUE.
add()
add stopword one at a time.
Stopwords$add(form = NA, tag = Tags$nnp)
form
char(optional)
: Form information. Default is NA.
tag
char(optional)
: Tag information. Default is "NNP". Please check Tags.
\dontrun{ sw <- Stopwords$new() sw$add("word", "NNG") sw$add("word", Tags$nng) }
add_from_dict()
add stopword from text file. text file need to form "TEXT/TAG". TEXT can remove like "/NNP". TAG required like "FORM/NNP".
Stopwords$add_from_dict(path, dict_name = "user")
path
char(required)
: dictionary file path.
dict_name
char(optional)
: default is "user"
remove()
remove stopword one at a time.
Stopwords$remove(form = NULL, tag = NULL)
form
char(optional)
: Form information. If form not set, remove tag in input.
tag
char(required)
: Tag information. Please check Tags.
save_dict()
save current stopwords list in text file.
Stopwords$save_dict(path)
path
char(required)
: file path to save stopwords list.
get()
return tibble of stopwords.
Stopwords$get()
a tibble for stopwords options
for analyze()
/ tokenize()
function.
clone()
The objects of this class are cloneable with this method.
Stopwords$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: Stopwords$new() ## End(Not run) ## ------------------------------------------------ ## Method `Stopwords$add` ## ------------------------------------------------ ## Not run: sw <- Stopwords$new() sw$add("word", "NNG") sw$add("word", Tags$nng) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.