similarity_map: Create a semantic map of a keyword

Description Usage Arguments Value What it does

View source: R/similarity_map.R

Description

Build a scatterplot that represents the conceptual structure of a keyword.

Usage

1
2
similarity_map(mat, keyword, method = "cosine", margin = 1,
  threshold = 50, numResults = 40, numGrps = 5)

Arguments

mat

A word-context matrix.

keyword

A string.

method

A character string: 'cosine', 'euclidean', 'pearson' or 'covariance', which names the mathematical similarity test to be performed. Default is 'cosine'.

margin

Numeric value: 1 or 2. If 1, calculations are performed over the rows. If 2, over the columns.

threshold

Numeric value: 0 to 100. Default is 50.

numResults

Numeric value. The number of words to be displayed in the graph. Default is 40.

numGrps

Numeric value. The number of groups in which you'd like to divide the display. Default is 5.

Value

A scatterplot showing structure of 30 most-similar words.

What it does

This function runs similarity over a word-context matrix and looks for the thirty most similar terms, then clusters them.


michaelgavin/empson documentation built on May 22, 2019, 9:50 p.m.