load("data/contractions.rda")
edit_contractions <- function(text){
x <- contractions$contraction
y <- contractions$expansion
x <- paste0('(?<!\\w)', x, '(?!\\w)')
text <- mgsub_regex(text, x, y, perl = T)
return(text)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.