Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/ReplaceByList.R
Optimized replacement of words inside a text corpus.
1 | ReplaceByList(corpus, wordsFile)
|
corpus |
a |
wordsFile |
a |
This function is provided as a replacing words step in a corpus composition process, this list must have a .txt file extension made by two columns, one for words of replacement and other for words to be replaced.
An object inheriting from VCorpus
and Corpus
.
Camila Gongora mcgongoraa@unal.edu.co, Andres Palacios anfpalacioscl@unal.edu.co
See also BibToCorpus
where this function is used internally.
1 2 3 4 5 6 | data("KDVizData")
wordsToReplace <- system.file("extdata", "KDReplaceWords.txt", package = "KDViz")
myCorpus <- BibToCorpus(bibData = KDVizData, bibUnits = "Keywords",
controlList = c("stripWhitespace", "removeNumbers"), stopWords = TRUE)
myNewCorpus <- ReplaceByList(myCorpus, wordsFile = wordsToReplace)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.