Package 'covfefe'

Title: Covfefy Any Word, Sentence or Speech
Description: Converts any word, sentence or speech into Trump's infamous "covfefe" format. Reference: <https://www.nytimes.com/2017/05/31/us/politics/covfefe-trump-twitter.html>. Inspiration thanks to: <https://codegolf.stackexchange.com/questions/123685/covfefify-a-string>.
Authors: Michael Kirchner
Maintainer: Michael Kirchner <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-10-26 03:09:41 UTC
Source: https://github.com/mkirch/covfefe

Help Index


Covfefy any word.

Description

We can't all be the Cheeto in Chief, so we need this function to ensure that we have the best words. This function takes a word, and performs the following algorithm thanks to this codegolf thread:

1. Include all characters up through the first vowel in the word. (co)

2. Identifies the next consonant after the first vowel in the word. (v)

3. Changes that consonant to a phonetically similar consonant. (f)

4. Finds the next vowel after that consonant. (e)

5. Combines the two, and repeats. (fefe)

6. Puts it all together: covfefe

Usage

covfefy(str = "coverage")

Arguments

str

Character string of word to covfefy. Defaults to "coverage".

Examples

covfefy("coverage")
covfefy("mexicans")
covfefy("wall")
covfefy("president")
covfefy("programming")

Covfefy any sentence.

Description

Calls covfefy() and uses rules to decide which, if any, word is covfefefied.

Usage

covfefySentence(sent = paste0("Despite the constant negative",
  " press coverage we are going ", "to Make America Great Again"),
  endSentence = TRUE)

Arguments

sent

Character string of sentence to covfefy. Defaults to the famous tweet.

endSentence

Boolean where TRUE forces use of punctuation.

Examples

covfefySentence(paste0("Despite the constant negative press coverage,",
                       "we are going to Make America Great Again"))

Covfefy any speech.

Description

Calls covfefySentences() and uses rules to decide which, if any, sentences are covfefefied.

Usage

covfefySpeech(text = system.file("extdata", "inauguration.txt", package =
  "covfefe"), out = "covfefe_inauguration.txt")

Arguments

text

Location of input .txt file.

out

Location of output .txt file.

Examples

covfefySpeech()