unselect_nodes: Undo select_nodes

View source: R/generic_reshape.r

unselect_nodesR Documentation

Undo select_nodes

Description

Not strictly required. Only available for elegance and minor memory efficiency

Usage

unselect_nodes(.tokens)

Arguments

.tokens

A tokenIndex in which nodes are selected with select_nodes.

Value

A tokenIndex (without a .nodes attribute)

Examples

tokens = tokens_spacy[tokens_spacy$doc_id == 'text4',]

tq = tquery(relation = "relcl", label = "relative_clause")
tokens = select_nodes(tokens, tq) 
selected_nodes(tokens)

tokens = unselect_nodes(tokens)

is.null(attr(tokens, '.nodes'))

rsyntax documentation built on June 7, 2022, 9:07 a.m.