print method for Stopwords objects
Usage
Stopwords$print(x, ...)
...
ignored
Method new()
Create a stopwords object for filter stopwords on analyze() and tokenize() results.
Usage
Stopwords$new(use_system_dict = TRUE)
Arguments
use_system_dict
bool(optional): use system stopwords dictionary or not.
Defualt is TRUE.
Method add()
add stopword one at a time.
Usage
Stopwords$add(form = NA, tag = Tags$nnp)
Arguments
form
char(optional): Form information. Default is NA.
tag
char(optional): Tag information. Default is "NNP". Please check Tags.
Examples
\dontrun{
sw <- Stopwords$new()
sw$add("word", "NNG")
sw$add("word", Tags$nng)
}
Method 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".
Usage
Stopwords$add_from_dict(path, dict_name = "user")
Arguments
path
char(required): dictionary file path.
dict_name
char(optional): default is "user"
remove stopword one at a time.
Usage
Stopwords$remove(form = NULL, tag = NULL)
Arguments
form
char(optional): Form information. If form not set, remove tag in input.
tag
char(required): Tag information. Please check Tags.
Method save_dict()
save current stopwords list in text file.
Usage
Stopwords$save_dict(path)
Arguments
path
char(required): file path to save stopwords list.
return tibble of stopwords.
Returns
a tibble for stopwords options
for analyze() / tokenize() function.
Method clone()
The objects of this class are cloneable with this method.
Usage
Stopwords$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.