Skip to contents

Assess whether a sentence contains gibberish words. For each word in a sentence, a Markov chain inspects the sequence of vowels and consonents to estimate whether a sentence consists of natural words. Therefore, words like 'asdfg' and 'dfrgfh' are considered unnatural and are classified as gibberish. The reliability of the model increases when your textual data contains more characters. Sourced from https://github.com/Glender/gibberlite

Usage

is_gibberish(text, threshold = 0.00345)

Arguments

text

Character. Words or sentences.

threshold

Numeric. Cutoff to classify text as either gibber or not.

Value

logical

Examples

text <- c("They don't want to know", "asdfg")
is_gibberish(text)
#> [1] FALSE  TRUE