Random Sentence Generator
I felt like doing a little JavaScript.
Also, I cried a little on the inside when I wrote "document.write"

&lt;body&gt;
    &lt;script type='text/javascript'&gt;
    function foo(){
        t=document.getElementById('ta').value.split("\n");
        eval('p='+t[1]);
        t[0]=t[0].split(' ');
        while(t[0][0]--) {
            s=t[0][1]
            while(x=s.match(/&lt;\w+&gt;/)) {
                ps=s;
                s=s.replace(x,p[x][Math.floor(Math.random()*p[x].length)]);
            }
            document.write(s+"&lt;br&gt;");
        }
    }
    &lt;/script&gt;
    &lt;textarea id='ta' cols='80'&gt;&lt;/textarea&gt;
    &lt;button onclick="foo()"&gt;go&lt;/button&gt;
&lt;/body&gt;


Input:

10 &lt;A&gt;
{"&lt;A&gt;":["a&lt;A&gt;b","c&lt;A&gt;d","&lt;B&gt;"],"&lt;B&gt;":["e&lt;C&gt;e"],"&lt;C&gt;":["z","&lt;A&gt;","&lt;B&gt;"]}


Output:

ccaaceeeeezeeeeedbbdd
accccceeeezeeeedddddb
aecezedeb
eaezebe
ccccaacezedbbdddd
eeeaaaceecacezedbdeedbbbeee
acaecaeaaeacccceeeeeeeaeeezeeebeeeeeeeddddbebbebdebdb
aaceezeedbb
aacezedbb
ceeaceecacaacezedbbdbdeedbeed