View source: R/generic_reshape.r
reselect_nodes | R Documentation |
Within a chain of reshape operations, reapply the tquery
reselect_nodes(.tokens)
.tokens |
A tokenIndex in which nodes are selected with select_nodes. |
A tokenIndex with a .nodes attribute
tokens = tokens_spacy[tokens_spacy$doc_id == 'text4',] ## use a tquery to label the nodes that you want to manipulate tq = tquery(relation = "relcl", label = "relative_clause") ## apply query to select nodes tokens2 = select_nodes(tokens, tq) ## reuses the tq, that is stored in tokens2 ## this makes it easy to make the selection anew after a transformation tokens2 = reselect_nodes(tokens2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.