
Plot method for S4 objects of class kRp.text
,
plots the frequencies of tagged word classes.
plot(x, y, ...)# S4 method for kRp.text,missing
plot(x, what = "wclass", ...)
An object of class kRp.text
From the generic plot
function, ignored for koRpus class objects.
Any other argument suitable for plot()
Character string, valid options are:
"wclass"
:Barplot of distribution of word classes
"letters"
:Line plot of distribution of word length in letters
# NOT RUN {
# code is only run when the english language package can be loaded
if(require("koRpus.lang.en", quietly = TRUE)){
sample_file <- file.path(
path.package("koRpus"), "examples", "corpus", "Reality_Winner.txt"
)
tokenized.obj <- tokenize(
txt=sample_file,
lang="en"
)
plot(tokenized.obj)
} else {}
# }
Run the code above in your browser using DataLab