tCorpus$feats_to_columns | R Documentation |
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
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.