written by martin on 2017-08-06
Generate random strings that make sense.
Hosted on GitHub: fabulist,
from fabulist import Fabulist fab = Fabulist() templates = [ "$(Verb:ing) is better than $(verb:ing).", "$(Noun:an) a day keeps the $(noun:plural) away.", "If you want to $(verb) $(adv), $(verb) $(adv)!", 'Confucius says: "The one who wants to $(verb) must $(verb) $(adv) the $(noun)!"', ] for q in fab.generate_quotes(templates, count=10): print("- ", q)
will produce something like
- A statement a day keeps the airports away. - Savoring is better than magnifying. - If you want to sate divisively, disuse calmly! - Praying is better than inspecting. - Confucius says: "The one who wants to sterilize must inform miserably the possibility!" - If you want to blur orderly, stride poorly! - A cost a day keeps the gears away. - Subtracting is better than worshipping. - If you want to damage solely, discuss jealously! - Confucius says: "The one who wants to vanish must swear terribly the punch!"