top_relations: Returns the words most associated with a keyword.

Description Usage Arguments Value Examples

View source: R/top_relations.R

Description

top_relations takes in a matrix, word, association method, and number of results and outputs a sorted list of words most associated with the input word based on the specified association method.

For a description of each method, type ?<method> in the console.

Usage

1
top_relations(m, word, method = "most correlated", num_results = 10)

Arguments

m

A matrix.

word

A word.

method

"most correlated," "most similar," or "least divergent."

num_results

An integer.

Value

Top words associated with word in matrix m.

Examples

1
top_relations(W, "loue", "most correlated", 20)

ajfabry/Statspeare documentation built on Jan. 26, 2020, 7:44 a.m.