Description Usage Arguments Value
Create an igraph tree from a data frame with token information, e.g, as donwloaded with amcat.get.tokens. This assumes that id, parent, and relation are presente in the data frame. Any other columns will be available as vertex and edge attributes (edge attributes are taken from the child token). If available, the 'word' column will be used to label the vertices. The data frame should contain a single sentence with a single root node (with no parent).
1 2 | graph_from_sentence(tokens, sentence = NULL, quotes = NULL,
clauses = NULL)
|
tokens |
a data frame of tokens containing id, parent, and relation columns |
sentence |
an optional sentence to filter the tokens (which should then contain a sentence column) |
quotes |
optionally, a list of quotes as returned by get_quotes |
clauses |
optionally, a list of clauses as returned by get_quotes |
an igraph graph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.