text_prep_multiword_phrases: Prepare multi-word phrases before unnesting

Description Usage Arguments Details Value Examples

View source: R/text_prep_multiword_phrases.R

Description

This function removes spaces from multi-word phrases, so they will be treated as a single word. This can be helpful when there are domain-specific multi-word phrases that you want to analyse as one term. Apply this function to your free-text columns before unnesting words.

Usage

1
text_prep_multiword_phrases(text_col, multiword_list = c(""))

Arguments

text_col

string vector (or dataframe column)

multiword_list

vector of multi-word phrases you want to treat as

Details

Returns multi-word phrases as a single word in PascalCase.

Value

string vector with multi-word phrases replaced in PascalCase

Examples

1
text_prep_multiword_phrases(c("test this", "not a test"), multiword_list = c("test this"))

DataS-DHSC/consultations documentation built on Jan. 28, 2022, 1:56 a.m.