Created
May 18, 2024 14:42
-
-
Save vjcitn/1db3097d26d634cb5e366f725c7e4bf7 to your computer and use it in GitHub Desktop.
make silly sentences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nouns = c("cat", "mat", "cow", "chair", "table", "person", "food") | |
pastverbs = c("sat", "walked", "rode", "spent", "moved", "wrote", "managed", "went") | |
preps = c("on", "over", "beyond", "above", "beneath") | |
indic = c("the", "a", "any", "some") | |
adjectives = c("cute", "big", "small", "tiny", "huge", "green") | |
get1 = function (x) sample(x, size=1) | |
sentence = function() { | |
sprintf("%s %s %s %s %s %s %s\n", get1(indic), get1(nouns), get1(pastverbs), | |
get1(preps), get1(indic), get1(adjectives), get1(nouns)) | |
} | |
sentence() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment