Character vector or list.
Text in a vector or list data format
allowPunctuations
Character vector.
Punctuations that should be allowed in the text.
Defaults to common punctuations in English text
Author
Alexander P. Christensen <alexpaulchristensen@gmail.com>
Details
Coarsely removes punctuations from text. Keeps general punctuations
that are used in most English language text. Apostrophes are much trickier.
For example, not allowing "'" will remove apostrophes from contractions
like "can't" becoming "cant"
# Load datadata(neo_ipip_extraversion)
# Example text text <- neo_ipip_extraversion$friendliness
# Keep only periodspunctuate(text, allowPunctuations = c("."))