Learn R Programming

covfefe (version 1.0.0)

garble_sentence: Garble a sentence with random corruptions

Description

Garble a sentence with random corruptions

Usage

garble_sentence(sentence, corruption_rate = 0.3)

Value

Character. Garbled sentence

Arguments

sentence

Character. Sentence to garble

corruption_rate

Numeric. Fraction of words to corrupt (0-1)

Examples

Run this code
set.seed(42)
garble_sentence("This is a test", corruption_rate = 0.5)

Run the code above in your browser using DataLab