View source: R/str_normalize_spacing.R
str_unify_spacing | R Documentation |
str_unify_spacing
- Normalizes whitespace by replacing everything
between words and punctuation characters with single space characters. The
identification of boundaries is performed using ICU Breakiterators with added
exceptions for #hashtags, @screen_names, URLs and <KLARTAGS> (as created by
other functions of this package)
str_unify_spacing(.str, .tok_lock_regex = NULL)
.str |
Character vector to be normalized |
.tok_lock_regex |
... |
str_unify_spacing
- Returns the normalized character vector
https://www.unicode.org/reports/tr29/#Word_Boundaries
## str_unify_spacing EXAMPLE:
str_unify_spacing(c(
"This @screen_name that\n #hash_tag, #1",
"<not-A_KLARTAG> <A_KLARTAG>!?!? An URL",
"www.example.com/test ..."
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.