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 |
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
covfefy(str = "coverage")
covfefy(str = "coverage")
str |
Character string of word to covfefy. Defaults to "coverage". |
covfefy("coverage") covfefy("mexicans") covfefy("wall") covfefy("president") covfefy("programming")
covfefy("coverage") covfefy("mexicans") covfefy("wall") covfefy("president") covfefy("programming")
Calls covfefy()
and uses rules to decide which, if any, word is
covfefefied.
covfefySentence(sent = paste0("Despite the constant negative", " press coverage we are going ", "to Make America Great Again"), endSentence = TRUE)
covfefySentence(sent = paste0("Despite the constant negative", " press coverage we are going ", "to Make America Great Again"), endSentence = TRUE)
sent |
Character string of sentence to covfefy. Defaults to the famous tweet. |
endSentence |
Boolean where TRUE forces use of punctuation. |
covfefySentence(paste0("Despite the constant negative press coverage,", "we are going to Make America Great Again"))
covfefySentence(paste0("Despite the constant negative press coverage,", "we are going to Make America Great Again"))
Calls covfefySentences()
and uses rules to decide which,
if any, sentences are covfefefied.
covfefySpeech(text = system.file("extdata", "inauguration.txt", package = "covfefe"), out = "covfefe_inauguration.txt")
covfefySpeech(text = system.file("extdata", "inauguration.txt", package = "covfefe"), out = "covfefe_inauguration.txt")
text |
Location of input .txt file. |
out |
Location of output .txt file. |
covfefySpeech()
covfefySpeech()