hyphen,kRp.corpus-method {tm.plugin.koRpus} | R Documentation |
Apply hyphen() to all texts in kRp.corpus objects
Description
This method calls hyphen
on all tagged text objects
inside the given words
object (using mclapply
).
Usage
## S4 method for signature 'kRp.corpus'
hyphen(words, mc.cores = getOption("mc.cores", 1L), quiet = TRUE,
...)
Arguments
words |
An object of class |
mc.cores |
The number of cores to use for parallelization,
see |
quiet |
Logical,
if |
... |
options to pass through to |
Value
An object of the same class as words
.
Examples
# use readCorpus() to create an object of class kRp.corpus
# code is only run when the english language package can be loaded
if(require("koRpus.lang.en", quietly = TRUE)){
myCorpus <- readCorpus(
dir=file.path(
path.package("tm.plugin.koRpus"), "examples", "corpus", "Winner", "Wikipedia_new"
),
# use tokenize() so examples run without a TreeTagger installation
tagger="tokenize",
lang="en"
)
myCorpus <- hyphen(myCorpus)
} else {}
[Package tm.plugin.koRpus version 0.4-2 Index]