Bug report to take into consideration for future versions

Help and bugs.

Bug report to take into consideration for future versions

Postby robertson » October 16th, 2013, 10:45 am

Hey,

I just half-fixed a bug in v1.0.4 which I don't know if it has already been fixed, but if not, here it is...

I use THATSTAR to create more context-specific answers:

Code: Select all
<category><pattern>YES</pattern><that>are you *</that><template><srai>I AM <thatstar index="1"/></srai></template></category>


... which turns YES responses into more specific phrases, such as in...

BOT: Are you Spanish
USR: Yes (bot understands I AM SPANISH)

But when the bot's previous answer was unclean, he gave no response.

BOT: Are you having lunch at four o'clock?
USR: YES (bot is supposed to undestand I AM HAVING LUNCH AT FOUR O'CLOCK, but the ' and the ? drove him crazy and he gave a blank response)

So on line 119 of getsetvars.php I changed

Code: Select all
$that =  urldecode($response_Array['that'][$indexArr[0]]);


to...

Code: Select all
$that = strtolower(trim(cleanThatPattern(urldecode($response_Array['that'][$indexArr[0]]))));



Another bug in this area, which I have worked around in AIML rather than fixing, is that THE WHOLE of the THAT phrase is included in the SRAI rather than just the THATSTAR:

Code: Select all
<category><pattern>YES</pattern><that>ARE YOU *</that><template><srai>I AM <thatstar index="1"/></srai></template></category>


Corresponding debug:

Code: Select all
FUNCTION: getThat
Array Name = Array#0
That = are you having lunch at four oclock

FUNCTION: 1. just before lookAgain
Array Name = Array#0
Looped and found: I AM are you having lunch at four oclock
User avatar
robertson
Avid Member
 
Posts: 72
Joined: November 10th, 2011, 4:06 pm

Re: Bug report to take into consideration for future version

Postby programo » November 2nd, 2013, 7:08 pm

thank you for that.
hopefully it might help others using the v1.0.4
User avatar
programo
Site Admin
 
Posts: 306
Joined: April 4th, 2011, 4:46 pm
Location: Nottingham UK


Return to Bugs and Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron