Learn R Programming

quanteda (version 1.5.2)

dfm_split_hyphenated_features: Split a dfm's hyphenated features into constituent parts

Description

Takes a dfm that contains features with hyphenated words, such as "split-second" and turns them into features that split the elements in the same was as `tokens(x, remove_hyphens = TRUE)` would have done.

Usage

dfm_split_hyphenated_features(x)

Arguments

x

input dfm

Examples

Run this code
# NOT RUN {
(dfmat <- dfm("One-two one two three."))
quanteda:::dfm_split_hyphenated_features(dfmat)
# }

Run the code above in your browser using DataLab