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)
#create abbreviation and replacement vectors
abv <- c("isn't", "I'd")
repl <- c("is not", "I would")
replace_abbreviation(x, abv, repl)
(KEY <- rbind(abbreviations, data.frame(abv = abv, rep = repl)))
replace_abbreviation(x, KEY)
Run the code above in your browser using DataLab