Execute a Markov algorithm: Difference between revisions

Expanded example
(fix bug)
(Expanded example)
Line 3,602:
I bought a bag of apples from my brother.
</pre>
<lang zkl>parseRuleSet("# Slightly modified// fromrule theset rulesin ona Wikipedia",list
T("# Slightly modified from the rules on Wikipedia",
"A -> apple", "B -> bag", "S -> .shop", "T -> the",
"the shop -> my brother", "a never used -> .terminating rule")) :
markov("I bought a B of As from T S.",_).println();
 
Anonymous user