probability {wordvector}R Documentation

Compute probability of words

Description

Compute the probability of words given other words.

Usage

probability(x, words, mode = c("words", "values"))

Arguments

x

a textmodel_wordvector object fitted with normalize = FALSE.

words

words for which probability is computed.

mode

specify the type of resulting object.

Value

a matrix of probability scores when mode = "values" or of words sorted in descending order by the probability scores when mode = "words". When words is a named numeric vector, probability scores are weighted by the values.

See Also

similarity()


[Package wordvector version 0.5.1 Index]