Description Usage Arguments Value Examples
This method calls lex.div
on all tagged text objects
inside the given txt
object (using mclapply
).
1 2 3 4 5 6 7 8 9 |
txt |
An object of class |
summary |
Logical, determines if the |
mc.cores |
The number of cores to use for parallelization,
see |
char |
Character vector to specify measures of which characteristics should be computed,
see
|
quiet |
Logical, if |
... |
options to pass through to |
An object of the same class as txt
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 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"),
hierarchy=list(
Topic=c(
Winner="Reality Winner",
Edwards="Natalie Edwards"
),
Source=c(
Wikipedia_prev="Wikipedia (old)",
Wikipedia_new="Wikipedia (new)"
)
),
# use tokenize() so examples run without a TreeTagger installation
tagger="tokenize",
lang="en"
)
myCorpus <- lex.div(myCorpus)
corpusSummary(myCorpus)
} else {}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.