w2vec_net: Network Visualization of the context of a word in a corpus.

Description Usage Arguments Value

Description

displays an interactive network visualization of the context of a word in a corpus. The network visualization uses the visNetwork() package.

Usage

1
2
3
w2vec_net(model, header, numwords_header = 20, numwords_sec = 5,
  value_scale = 1000, node_color = "red", node_shape = "dot",
  node_shadow = TRUE)

Arguments

model

A word2vec VectorSpace model ouput.

header

A word whose context the user wants to plot in the network.

numwords_header

The number of words primarily linked (nearest) to the header word (with the highest cosine similairities) taken in the network. Defaults to 20.

value_scale

The scale for the size of the nodes in the network, with the size of the nodes being proportional to how closely they are associated (in terms of cosine similairty) with the header. Defaults to 1000.

node_color

The color of the nodes in the network. Defaults to red color.

node_shadow

Whether shadowin is used for the nodes. Defaults to TRUE.

numwors_sec

The number of secondary words connected to each of the primary link words (highest cosine similarities with the primary link words). Defaults to 5.

node_shaoe

The shape of the nodes in the networl. Defaults to "dot".

Value

Returns an interactive network visulaization of the header word along with its primary and secondary linked words.


kkdey/WEAVER documentation built on May 8, 2019, 9:24 a.m.