Create phrase network.

phrase_net(
  data,
  connectors = c("to", "in", "at", "and", "of"),
  keep_connector = FALSE,
  ...
)

Arguments

data

A data.frame or tibble containig text.

connectors

Words that establish connections between words and ultimately form edges.

keep_connector

Whether to include the connecting terms (connectors) in the edgelist returned.

...

Arguments to pass to method, namely text.

Examples

data(reuters) net1 <- phrase_net(reuters, text = text) net2 <- phrase_net(reuters$text) identical(net1, net2)
#> [1] TRUE