replace_special_characters {MetaNLP} | R Documentation |
Replace special characters in column names
Description
When using non-english languages, the column names of the word count matrix can contain special characters. These might lead to encoding problems, when this matrix is used to train a machine learning model. This functions automatically replaces all special characters by the nearest equivalent character, e.g. "é" would be replaced by "e".
Usage
replace_special_characters(object)
## S4 method for signature 'MetaNLP'
replace_special_characters(object)
Arguments
object |
An object of class MetaNLP. |
Value
An object of class MetaNLP, where the column names do not have special characters anymore.
Examples
path <- system.file("extdata", "test_data.csv", package = "MetaNLP", mustWork = TRUE)
obj <- MetaNLP(path, language = "french")
obj <- replace_special_characters(obj)
[Package MetaNLP version 0.1.2 Index]