Split conjunctions for dependency trees in Universal Dependencies
Split conjunctions for dependency trees in Universal Dependencies
split_UD_conj( tokens, conj_rel = "conj", cc_rel = "cc", unpack = T, no_fill = NULL, min_dist = 0, max_dist = Inf, right_fill_dist = T, compound_rel = c("compound*", "flat"), ... )
tokens |
a tokenIndex based on texts parsed with |
conj_rel |
The dependency relation for conjunctions. By default conj |
cc_rel |
The dependency relation for the coordinating conjunction. By default cc. This will be removed. |
unpack |
If TRUE (default), create separate branches for the parent and the node that inherits the parent position |
no_fill |
Optionally, a character vector with relation types that will be excluded from fill |
min_dist |
Optionally, a minimal distance between the conj node and its parent |
max_dist |
Optionally, a maximum distance between the conj node and its parent |
right_fill_dist |
Should fill to the right of the conjunction be used? |
compound_rel |
The relation types indicating compounds |
... |
specify conditions for the conjunction token. For instance, using 'pos = "VERB"' to only split VERB conjunctions. This is especially usefull to use different no_fill conditions. |
A tokenindex
tokens = tokens_spacy[tokens_spacy$doc_id == 'text5',] if (interactive()) { tokens %>% split_UD_conj() %>% plot_tree() }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.