compare_txt: Match cheaters

Description Usage Arguments Value Author(s) Examples

View source: R/catch_em.R

Description

Match cheaters

Usage

1
compare_txt(txt1, txt2, n_grams = 10, across = c("both", "txt1", "txt2"))

Arguments

txt1, txt2

character vectors to compare, each of length 1.

n_grams

see ngram package.

across

How should the percentage of overlap be computed?

Value

The percent (0-1) of overlap between the texts

Author(s)

Mattan S. Ben-Shachar

Examples

1
2
3
text1 <- "My horse is large and white, and I ride it every day."
text2 <- "My mule is large and brown, and I ride it most days."
compare_txt(text1, text2, n_grams = 3)

cheatR documentation built on July 1, 2020, 9:16 p.m.