phrase_net: Phrase Net

Description Usage Arguments Examples

View source: R/nets.R

Description

Create phrase network.

Usage

1
2
3
4
5
6
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

1
2
3
4
5
data(reuters)
net1 <- phrase_net(reuters, text = text)
net2 <- phrase_net(reuters$text)

identical(net1, net2)

news-r/phrasenets documentation built on Nov. 4, 2019, 9:40 p.m.