Cast the "feats" column in UDpipe tokens to columns
If the UDpipe parser is used in create_tcorpus
, the 'feats' column contains strings with features
(e.g, Number=Sing|PronType=Dem). To work with these nested features it is more convenient to cast them to columns.
keep |
Optionally, the names of features to keep |
drop |
Optionally, the names of features to drop |
rm_column |
If TRUE (default), remove the original column |
Usage:
## R6 method for class tCorpus. Use as tc$method (where tc is a tCorpus object).
feats_to_columns(keep=NULL, drop=NULL, rm_column=TRUE)
if (interactive()) { tc = create_tcorpus('This is a test Bobby.', udpipe_model='english-ewt') tc$feats_to_columns() tc$tokens tc = create_tcorpus('This is a test Bobby.', udpipe_model='english-ewt') tc$feats_to_columns(keep = c('Gender','Tense','Person')) tc$tokens }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.