Description Usage Arguments Value Examples
View source: R/replace_contraction.R
This function replaces contractions with long form.
1 2 | replace_contraction(x, contraction.key = lexicon::key_contractions,
ignore.case = TRUE, ...)
|
x |
The text variable. |
contraction.key |
A two column hash of contractions (column 1) and
expanded form replacements (column 2). Default is to use
|
ignore.case |
logical. Should case be ignored? |
... |
ignored. |
Returns a vector with contractions replaced.
1 2 3 4 5 6 7 8 9 10 | ## 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)
|
[1] "Mr. Jones is not going." "Check it out what is going on."
[3] "he is here but did not go." "the robot at t.s. was not nice"
[5] "he would like it if I would go away"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.