Assorted Text Generation
version 4 by Emily Short
Section 1 - Selections of a Group
To say selection of (superset - a description of objects) conforming to the description (subset - a description of objects) is-are:
let subset count be the number of members of subset;
let superset count be the number of members of superset;
if the subset count is greater than superset count:
say "BUG: author has misdefined sets";
rule succeeds;
if the subset count is the superset count:
if subset count is 0:
rule succeeds;
otherwise:
say "[subset is-are all]";
otherwise:
if subset count is 0:
say "[none of superset is-are]";
otherwise if subset count is 1:
say "[the list of the members of subset] is";
otherwise:
say "[the list of the members of subset] are".
To say none of (superset - a description of objects) is-are:
if the number of members of superset is 2:
say "neither is";
otherwise:
say "none are".
To say (superset - a description of objects) is-are both/all:
let superset count be the number of members of superset;
if the superset count is 1:
say "[one of]it's[or]it is[purely at random]";
if the superset count is 2:
say "[one of]both of them are[or]both are[or]they are both[or]they're both[purely at random]";
if the superset count is greater than 2:
say "[one of]they are all[or]they're all[or]every one of them is[or]all [superset count in words] are[purely at random]".
To say explicit none of (superset - a description of objects) is-are:
let first be a random member of the superset;
let second be the first;
while the first is the second:
let second be a random member of the superset;
if the number of members of superset is 2:
say "neither [the first] nor [the second] is";
otherwise:
say "none of [the list of members of the superset] are".
To say explicit both (superset - a description of objects) is-are:
say explicit both superset;
let superset count be the number of members of superset;
if the superset count is 1:
say " is";
if the superset count is 2:
say " are";
if the superset count is greater than 2:
say " are all".
To say explicit both (superset - a description of objects):
let superset count be the number of members of superset;
if the superset count is 1:
say "[the list of the members of superset]";
if the superset count is 2:
say "both [the list of the members of superset]";
if the superset count is greater than 2:
say "[the list of the members of superset]".
To say explicit (superset - a description of objects) is-are both/all:
let superset count be the number of members of superset;
if the superset count is 1:
say "[the list of the members of superset] is";
if the superset count is 2:
say "[the list of the members of superset] are both";
if the superset count is greater than 2:
say "[the list of the members of superset] are all".
To say next:
say "[one of]after a moment[or]then[or]shortly[or]just then[or]next[or]moments later[at random]";