Perl RiveScript 1.15|Casey|casey@cuvou.net|1207149936|Kirsle|xx|0|69.16.222.179 76.87.114.165|Version 1.14 of the Perl RiveScript interpreter has been released today. The changes mostly deal with bug fixes. Namely:<br /><br />- If your reply set didn't include a BEGIN/request pair, replies wouldn't be matched at all (reply() would return nada).<br />- Tags in the BEGIN/request response weren't being reprocessed after a reply was fetched, and now they are.<br /><br />And a couple of other bug fixes to optimize the code a little. In the default reply set that comes with the Perl module (which includes an Eliza-esque set of replies), there'd occasionally be Perl warnings about uninitialized values when trying to substitute the &lt;star&gt; tags in, so this won't be a problem now because the &lt;star&gt; tags will substitute blank text if that particular index isn't defined.<br /><br />There were also some amendments to the Working Draft: http://www.rivescript.com/wd/RiveScript.html||1213935606|Kirsle|
Re: Perl RiveScript 1.15|Casey|casey@cuvou.net|1213935927|Kirsle|xx|0|76.87.114.165|Today I uploaded version 1.15 of the Perl module to CPAN. I didn't wanna create a new topic for it but it's a relatively significant release. Specifically, the substitution codes have been reworked to allow for multiple-word patterns.<br /><br />For instance, these person substitutions can work now:<br /><br />[code]! person you are = I am<br />! person i am = you are[/code]<br /><br />Previously person substitutions would only work on single-word patterns, because it's complicated to substitute things that contradict eachother without one overriding or undoing the other. i.e...<br /><br />[code]# these contradict and undo eachother<br />s/i am/you are/g;<br />s/you are/i am/g;[/code]<br /><br />So I came up with a system of ROT13 encoding the substituted text so that contradictory substitution patterns won't undo the previous sub, and then going back and ROT13-decoding everything that was substituted in. I tested this functionality a bit but I haven't REALLY been trying my hardest to break it.<br /><br />So I'd really like it if somebody finds a way to break this. Like the person substitutions, the regular subs (from the &quot;! sub&quot; lines) also worked on single words and now the new code lets multiple-word patterns be allowed, so if you find a way to break these too, let me know. I had to change the algorithm a couple different times just in my own testing so I'm sure there might be some bugs left to work out.<br /><br />If this particular functionality can become reasonably stable, it'll get the Perl RiveScript module that much closer to matching the high standards of the Working Draft, getting Perl RiveScript up to the 2.00 Final version, and stabilizing the Draft to make it a better foundation for other programming languages to try at it.<br /><br />Version 1.15 can be found here: http://search.cpan.org/~kirsle/RiveScript-1.15/lib/RiveScript.pm<br /><br />And as always, the latest version is always available at this URL: http://search.cpan.org/perldoc?RiveScript||1213936021|Kirsle|
