RiveScript Python bug report.|8-I.us|planet8@rocketmail.com|1336509501|79b.org|xx|0|74.70.158.102|Bug Report<br />Description: See the &lt;star2&gt; tag below copied from my log.<br />This is a brand new site which is not ruled out as the cause.<br /><br />[font=Courier New]&gt;&gt;&gt; I am sad. <br />&lt;&lt;&lt; I'm sure it's not pleasant to be &lt;star2&gt;.<br /><br />&gt;&gt;&gt; hello <br />&lt;&lt;&lt; How do you do. Please state your problem.[/font]<br /><br />Reference: http://8-i.us/rivescript-python/||1336509767|79b.org|
Re: RiveScript Python bug report.|Kirsle|casey@cuvou.net|1336509887|Kirsle|xx|0|64.111.111.107|This problem is in the Eliza brain in particular. This trigger/response doesn't make a ton of sense ;)<br /><br />[code]+ i am (sad&#124;unhappy&#124;mad&#124;angry&#124;pissed&#124;depressed) [*]<br />- I am sorry to hear that you are &lt;star2&gt;.<br />- Do you think coming here will help you not to be &lt;star2&gt;?<br />- I'm sure it's not pleasant to be &lt;star2&gt;.<br />- Can you explain what made you &lt;star2&gt;?[/code]<br /><br />&lt;star2&gt; would never be defined here, because the second &quot;star&quot; is an optional one and therefore wouldn't be available for a &lt;star&gt; tag. The reply should use &lt;star&gt; or &lt;star1&gt; instead. Here's how the Perl version copes:<br /><br />[code]You&gt; hello<br />Bot&gt; Hi. What seems to be your problem?<br />You&gt; I am sad<br />Bot&gt; I am sorry to hear that you are .<br /><br />You&gt; hello<br />Bot&gt; Hi. What seems to be your problem?<br />You&gt; I am sad panda<br />Bot&gt; I am sorry to hear that you are .[/code]<br /><br />On the Perl version, it attempts to substitute &lt;star*&gt; with the relevant index number from the regex match, and in this case that index number is undefined so the tag is swept away with nothing in its place. Python cares a little bit more about trying to substitute in a variable that doesn't exist, so it's more particular about [i]which[/i] &lt;star&gt; tags get substituted out. There is no second star, so it leaves &lt;star2&gt; alone.<br /><br />The eliza.rs file has a lot of problems like this, it really needs some tidying up. :) ||||
Re: RiveScript Python bug report.|Kirsle|casey@cuvou.net|1336603159|Kirsle|xx|0|64.111.111.107|I've fixed the problematic triggers in eliza.rs and uploaded the change to all three RiveScript repositories (Python, Perl and Java).<br /><br />[url]https://github.com/kirsle/rivescript-python/commit/30d3e3d7cb4b105bd97c6028a3f417e060ce2339[/url]||1336603193|Kirsle|
[SOLVED]|8-I.us|planet8@rocketmail.com|1336674206|79b.org|xx|0|74.70.158.102|[SOLVED]<br /><br />I just loaded your fixed RiveScript file and it solved the problem!<br /><br />And thank you for adding a brand new forum for future<br />RiveScript Python bug reports.||||
