Compute the perplexity of a trained word2vec model with data.
perplexity(x, targets, data)a trained textmodel_wordvector object.
words for which probabilities are computed.
a quanteda::tokens or quanteda::dfm; the probabilities of words are tested against occurrences of words in it.