Helper function for aggregate_rsyntax
This function is used within the aggregate_rsyntax
function to facilitate aggregating by specific labels.
agg_label(label, ...)
label |
The rsyntax label. Needs to be an existing value in the annotation column (as specified when calling |
... |
Specify the new aggregated columns in name-value pairs. The name is the name of the new column, and the value should be a function over a column in $tokens. For example: subject = paste(token, collapse = ' ') would create the column 'subject', of which the values are the concatenated tokens. See examples for more. |
Not relevant. Should only be used within aggregate_rsyntax
tc = tc_sotu_udpipe$copy() tc$udpipe_clauses() ## count number of tokens in predicate aggregate_rsyntax(tc, 'clause', txt=FALSE, agg_label('predicate', n = length(token_id)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.