get_branch_id: Add the branch id as a column to the tokenindex

View source: R/isolate_branches.r

get_branch_idR Documentation

Add the branch id as a column to the tokenindex

Description

After splitting trees into branches

Usage

get_branch_id(tokens)

Arguments

tokens

A tokenindex

Value

the tokenindex

Examples

tokens = tokens_spacy[tokens_spacy$doc_id == 'text4',]
tokens = as_tokenindex(tokens)


tokens2 = isolate_branch(tokens, relation = 'relcl', copy_parent = TRUE)
get_branch_id(tokens2)


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