Skip to content

Instantly share code, notes, and snippets.

@Lokaltog
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lokaltog/99beb52174352df2c787 to your computer and use it in GitHub Desktop.
Save Lokaltog/99beb52174352df2c787 to your computer and use it in GitHub Desktop.
Dynamic sentences for the Baba Grammar Designer
{
"transforms": {
"children": [
{
"id": "geew4jan3d",
"children": [
{
"id": "19jkvwd4ea",
"transforms": [
[
"^(.*?)e?$",
"$1est"
]
],
"label": "Adjectivify",
"type": "suffix",
"tag": "est"
},
{
"id": "1zent3ak5p",
"transforms": [
[
"^(.*)([^ou])y$",
"$1$2ies"
],
[
"^(.*)$",
"$1s"
]
],
"label": "Plural",
"type": "suffix",
"tag": "s"
}
],
"label": "Noun"
},
{
"id": "b2ask9dnur",
"children": [
{
"id": "rlgegh0hmh",
"transforms": [
[
"^(.*)$",
"$1burg"
]
],
"label": "burg",
"type": "suffix",
"tag": "burg"
},
{
"id": "251i7v7z3c",
"transforms": [
[
"^(.*?)[aeiouy]?$",
"$1edelacroix"
]
],
"label": "delacroix",
"type": "suffix",
"tag": "delacroix"
},
{
"id": "qc740by3ka",
"transforms": [
[
"^(.*?)[aeiouy]?$",
"$1hurst"
]
],
"label": "hurst",
"type": "suffix",
"tag": "hurst"
},
{
"id": "1wfjmseepa",
"transforms": [
[
"^(.*?)[aeiouy]?(ing|ive)?$",
"$1ington"
]
],
"label": "ington",
"type": "suffix",
"tag": "ington"
}
],
"label": "Name"
},
{
"id": "310iy3uwlf",
"children": [
{
"id": "vdy8096fbe",
"transforms": [
"function (str) { return str.replace(/\\w\\S*/g, function(txt){ return ['von'].indexOf(txt) > -1 ? txt : txt.charAt(0).toUpperCase() + txt.substr(1) }) }"
],
"label": "Titlecase"
},
{
"id": "2b97br2t4i",
"transforms": [
"function (str) { return str.toUpperCase() }"
],
"label": "Uppercase"
},
{
"id": "lz0y51spmz",
"transforms": [
"function (str) { return str.charAt(0).toUpperCase() + str.substr(1) }"
],
"label": "Uppercase first"
}
],
"label": "Common"
},
{
"id": "j5amwpc7um",
"children": [
{
"id": "tfz6luv7hh",
"transforms": [
[
"^(.*?)[aeiouy]?$",
"$1er"
]
],
"label": "Nounify",
"type": "suffix",
"tag": "er"
}
],
"label": "Verb"
}
]
},
"grammar": {
"children": [
{
"id": "fxliydn4lh",
"children": [
{
"id": "cdeozojprc",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "u39mw2xghr"
},
{
"ref": "ios8hxrp50"
},
{
"ref": "3kqpmqh436",
"transform": [
"1zent3ak5p"
]
}
]
}
],
"label": "Catchphrase"
},
{
"id": "gfdfddkrfm",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "rbk1u44ezq",
"whitespace": false,
"transform": [
"lz0y51spmz"
]
},
{
"str": "!"
}
]
}
],
"label": "Confirm"
},
{
"id": "mjtqdap1f8",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "7u4phcvh72",
"whitespace": false,
"transform": [
"lz0y51spmz"
]
},
{
"str": "!"
}
]
}
],
"label": "Error"
},
{
"id": "27ydkwfrk5",
"type": "sentence",
"elements": [
{
"sentence": [
{
"str": "The"
},
{
"ref": "adab986k25",
"transform": [
"19jkvwd4ea"
]
},
{
"ref": "ios8hxrp50"
},
{
"ref": "3kqpmqh436"
},
{
"ref": "u39mw2xghr",
"transform": [
"tfz6luv7hh"
]
},
{
"ref": "pn8nrhp8vh"
}
]
}
],
"label": "Generator"
},
{
"id": "nbn2jbzcqi",
"type": "sentence",
"elements": [
{
"sentence": [
{
"whitespace": false,
"ref": "tduc7o9omo",
"transform": [
"vdy8096fbe"
]
},
{
"str": ","
},
{
"ref": "jgjh8hs1kd",
"whitespace": false,
"transform": [
"vdy8096fbe"
]
},
{
"str": "."
}
]
},
{
"sentence": [
{
"ref": "tduc7o9omo",
"transform": [
"vdy8096fbe"
]
},
{
"ref": "dcyh3jr6ud",
"transform": [
"2b97br2t4i"
]
}
]
}
],
"label": "Name"
},
{
"id": "4fldp09sjw",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "7gt7cb2yys",
"whitespace": false,
"transform": [
"lz0y51spmz"
]
},
{
"str": "!"
}
]
}
],
"label": "No"
},
{
"id": "8hi42i9ejc",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "lb6xggxcwb",
"whitespace": false,
"transform": [
"lz0y51spmz"
]
},
{
"str": "!"
}
]
}
],
"label": "Yes"
}
],
"label": "Exposed"
},
{
"id": "3uc88nm978",
"children": [
{
"id": "n6dvad7tfw",
"children": [
{
"id": "tduc7o9omo",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "5ign0yodad"
}
]
},
{
"sentence": [
{
"ref": "5ign0yodad",
"transform": [
"1wfjmseepa"
]
}
]
},
{
"sentence": [
{
"ref": "5ign0yodad",
"transform": [
"qc740by3ka"
]
}
]
},
{
"sentence": [
{
"ref": "5ign0yodad",
"transform": [
"rlgegh0hmh"
]
}
]
},
{
"sentence": [
{
"ref": "5ign0yodad",
"transform": [
"251i7v7z3c"
]
}
]
}
],
"label": "Modified surname"
},
{
"id": "dpc5fn1y4r",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "gbam1umozu"
},
{
"ref": "vtnsmwixbz"
},
{
"ref": "vtnsmwixbz"
}
]
},
{
"sentence": [
{
"ref": "gbam1umozu"
},
{
"ref": "vtnsmwixbz"
}
]
},
{
"sentence": [
{
"ref": "vtnsmwixbz"
},
{
"ref": "vtnsmwixbz"
}
]
}
],
"label": "Prefix"
},
{
"id": "5ign0yodad",
"type": "sentence",
"elements": [
{
"sentence": [
{
"ref": "dpc5fn1y4r"
},
{
"str": "mc",
"whitespace": false
},
{
"ref": "adab986k25",
"transform": [
"vdy8096fbe"
]
}
]
},
{
"sentence": [
{
"ref": "dpc5fn1y4r"
},
{
"str": "mac",
"whitespace": false
},
{
"ref": "adab986k25",
"transform": [
"vdy8096fbe"
]
}
]
},
{
"sentence": [
{
"ref": "dpc5fn1y4r"
},
{
"str": "von"
},
{
"ref": "adab986k25"
}
]
},
{
"sentence": [
{
"ref": "dpc5fn1y4r"
},
{
"str": "de",
"whitespace": false
},
{
"ref": "adab986k25",
"transform": [
"vdy8096fbe"
]
}
]
}
],
"label": "Surname"
}
],
"label": "Compiled"
},
{
"id": "vtnsmwixbz",
"type": "wordlist",
"elements": [
"archibald",
"arthur",
"cornelius",
"cyrus",
"emmett",
"ezekiel",
"hudson",
"malachi",
"montgomery",
"q.",
"quincy",
"rex",
"sinclair",
"theodore",
"v.",
"w.",
"x.",
"y.",
"z."
],
"label": "Name or initial"
},
{
"id": "dcyh3jr6ud",
"type": "wordlist",
"elements": [
"ii",
"iii",
"iv"
],
"label": "Number"
},
{
"id": "gbam1umozu",
"type": "wordlist",
"elements": [
"baron",
"count",
"dr.",
"duke",
"earl",
"general",
"gov.",
"lord",
"pres.",
"prof.",
"sir"
],
"label": "Prefix"
},
{
"id": "jgjh8hs1kd",
"type": "wordlist",
"elements": [
"esq",
"jr",
"m. d",
"ph. d",
"sr"
],
"label": "Suffix"
}
],
"label": "Name"
},
{
"id": "egw0qphe0z",
"children": [
{
"id": "adab986k25",
"type": "wordlist",
"elements": [
"amazing",
"awesome",
"best",
"excellent",
"fabulous",
"fantabulous",
"fantastic",
"formidable",
"great",
"impressive",
"marvelous",
"outstanding",
"preeminent",
"stunning",
"superb",
"terrific",
"wonderful"
],
"label": "Awesome"
},
{
"id": "rbk1u44ezq",
"type": "wordlist",
"elements": [
"affirmative",
"all according to plan",
"allright",
"awesome",
"confirmed",
"copy that",
"finally",
"got it",
"great",
"it's all coming together",
"neat",
"nice",
"roger that",
"sweet"
],
"label": "Confirm"
},
{
"id": "u39mw2xghr",
"type": "wordlist",
"elements": [
"build",
"construct",
"create",
"design",
"develop",
"devise",
"fabricate",
"fashion",
"forge",
"form",
"generate",
"make",
"produce",
"shape"
],
"label": "Create"
},
{
"id": "7u4phcvh72",
"type": "wordlist",
"elements": [
"aw man",
"bummer",
"crap",
"dammit",
"engage panic mode",
"let me try again",
"oh god no",
"oh no",
"seriously?",
"why me?",
"why?"
],
"label": "Error"
},
{
"id": "pn8nrhp8vh",
"type": "wordlist",
"elements": [
"ever",
"ever made",
"in the universe",
"in the world",
"of all time",
"on the internets",
"there is"
],
"label": "Ever"
},
{
"id": "ios8hxrp50",
"type": "wordlist",
"elements": [
"crap",
"garbage",
"junk",
"nonsense",
"rubbish",
"trash"
],
"label": "Garbage"
},
{
"id": "7gt7cb2yys",
"type": "wordlist",
"elements": [
"... or not",
"fuck that",
"i changed my mind",
"maybe later",
"nah",
"never mind",
"no",
"no thanks",
"no way",
"no, thank you",
"screw that"
],
"label": "No"
},
{
"id": "3kqpmqh436",
"type": "wordlist",
"elements": [
"article",
"book",
"document",
"narrative",
"novel",
"story",
"text",
"writing"
],
"label": "Text"
},
{
"id": "lb6xggxcwb",
"type": "wordlist",
"elements": [
"absolutely",
"fuck yes",
"hell yeah",
"i'm positive",
"of course",
"oh, yes",
"sure",
"why not",
"yeah",
"yes please",
"yes, sir",
"yup"
],
"label": "Yes"
}
],
"label": "Synonym"
}
],
"name": "Baba dynamic site text",
"author": "Lokaltog",
"comment": "Generate dynamic name suggestions, button labels, etc. for the Baba Create-a-Generator application."
},
"exposed": [
"cdeozojprc",
"gfdfddkrfm",
"27ydkwfrk5",
"mjtqdap1f8",
"nbn2jbzcqi",
"4fldp09sjw",
"8hi42i9ejc"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment