(tks <- tokenize("The old man and the sea."))
# for a types object ----------
(tps <- types(tks))
n_types(tps)
# for a freqlist object -------
(flist <- freqlist(tks))
n_tokens(flist)
n_types(flist)
# for an assoc_scores object --
a <- c(10, 30, 15, 1)
b <- c(200, 1000, 5000, 300)
c <- c(100, 14, 16, 4)
d <- c(300, 5000, 10000, 6000)
types <- c("four", "fictitious", "toy", "examples")
(scores <- assoc_abcd(a, b, c, d, types = types))
n_types(scores)
Run the code above in your browser using DataLab