knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
RSyntext is a package that provides high level summary statistics for input text. Its functions are made to be robust and are written in such a way that special characters or outliers in the text will not break expected behaviour. Functions contain parameters that provide the ability to clean input text, remove stopwords, etc.
text_summarize()
: Provides total word count, total sentence count, most common + least common words, average word length, and average number of words per sentence
text_quality()
: Provides the number of spelling errors in input text, as well as the presence of toxic words
text_grams()
: Provides the most frequent n-grams in input text
Below are example inputs and outputs for RSyntext.
suppressWarnings(library(RSyntext))
example <- "I don’t care what they’re going to say. Let the storm rage on. The cold never bothered me anyway." knitr::kable(text_summarize(example))
example2 <- "This str has words spelllll wrong. This string has a slag word shitty." knitr::kable(text_quality(example2))
example3 <- "You can stand under my umbrella, You can stand under my umbrella, Under my umbrella, Under my umbrella, Under my umbrella" knitr::kable(text_grams(example3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.