token_family: Get the parents or children of a set of ids

Description Usage Arguments

View source: R/recursive_search.r

Description

Get the parents or children of a set of ids

Usage

1
2
3
token_family(tokens, ids, level = "children", depth = Inf,
  minimal = F, block = NULL, replace = F, show_level = F,
  lookup = NULL, g_id = NULL)

Arguments

tokens

The tokenIndex

ids

A data.table with global ids (doc_id,sentence,token_id).

level

either 'children' or 'parents'

depth

How deep to search. eg. children -> grandchildren -> grandgrand etc.

minimal

If TRUE, only return doc_id, sentence, token_id and parent

block

A data.table with global ids (doc_id,sentence,token_id) for excluding nodes from the search

replace

If TRUE, re-use nodes in deep_family()

show_level
lookup

filter tokens by lookup values. Will be applied at each level (if depth > 1)

g_id

filter tokens by id. See lookup


vanatteveldt/rsyntax documentation built on Nov. 10, 2018, 6:40 p.m.