replace_contraction {qdap} | R Documentation |
Replace Contractions
Description
This function replaces contractions with long form.
Usage
replace_contraction(
text.var,
contraction = qdapDictionaries::contractions,
replace = NULL,
ignore.case = TRUE,
sent.cap = TRUE
)
Arguments
text.var |
The text variable. |
contraction |
A two column key of contractions (column 1) and expanded
form replacements (column 2) or a vector of contractions. Default is to use
qdapDictionaries's |
replace |
A vector of expanded form replacements if a data frame is not supplied to the contraction argument. |
ignore.case |
logical. If |
sent.cap |
logical. If |
Value
Returns a vector with contractions replaced.
See Also
bracketX
,
qprep
,
replace_abbreviation
,
replace_number
,
replace_symbol
Examples
## Not run:
x <- c("Mr. Jones isn't going.",
"Check it out what's going on.",
"He's here but didn't go.",
"the robot at t.s. wasn't nice",
"he'd like it if i'd go away")
replace_contraction(x)
## End(Not run)
[Package qdap version 2.4.6 Index]