AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Get what said the bot before
 
 

Hello
Currently I translate alice free aiml files to my language but I don’t understand why this part why not working:

<category><pattern>WHAT DID YOU ASK JUST BEFORE *</pattern>
<
template>I said "<that index="2,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU ASK BEFORE *</pattern>
<
template>I said "<that index="2,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU ASK *</pattern>
<
template>I said "<that index="1,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU SAY JUST BEFORE *</pattern>
<
template>I said "<that index="2,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU SAY BEFORE *</pattern>
<
template>I said "<that index="2,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU SAY</pattern>
<
template>I said "<that index="1,1"/>" .</template>
</
category>
<
category><pattern>WHAT DID YOU SAY *</pattern>
<
template>I said"<that index="2,1"/>".</template>
</
category

I don’t get anything between ” ” symbols.
Program-o can’t use this or aiml part isn’t correct?
How can I get what said the chatbot before?

 

 
  [ # 1 ]

Just out of curiosity, what happens if you use single quotes around the <that> tags in those categories, or simply removed them? It may be a bug in the script that involves those quotations marks. I’ll see what it looks like on my Program O install and see if I get the same thing.

 

 
  [ # 2 ]

Ok, I did some testing. the results are below, in the form of a conversation log. But first, some stats:

[ul]
[li]OS: Windows 10 Pro[/li]
[li]Server: Apache 2.4.25 (WIN64)[/li]
[li]PHP: 5.6.32[/li]
[li]Program O Version: 2.6.7 (DEV branch)[/li]
[/ul]

Conversation log (Note: conversation log shown “bottom-up”, with newest responses shown first):

FriendWHAT DID YOU SAY before
fooBot
I said " I SAID I SAID I SAID I SAID I SAID I SAID I SAID I SAID HI THERE ".
FriendWHAT DID YOU SAY
fooBot
I said " I SAID I SAID I SAID I SAID I SAID I SAID I SAID HI THERE ".
FriendWHAT DID YOU SAY BEFORE that
fooBot
I said " I SAID I SAID I SAID I SAID I SAID I SAID HI THERE ".
FriendWHAT DID YOU SAY JUST BEFORE that
fooBot
I said " I SAID I SAID I SAID I SAID I SAID HI THERE ".
FriendWHAT DID YOU ASK me
fooBot
I said " I SAID I SAID I SAID I SAID I SAID HI THERE ".
Friendwhat did you ask before that?
fooBotI said " I SAID I SAID I SAID I SAID HI THERE ".
Friendwhat did you ask just before that
fooBot
I said " I SAID I SAID I SAID I SAID HI THERE ".
Friendwhat did you say before that
fooBot
I said " I SAID I SAID I SAID HI THERE ".
Friendwhat did you say
fooBot
I said " I SAID I SAID I SAID HI THERE ".
Friendwhat did you say before that
fooBot
I said " I SAID I SAID HI THERE ".
Friendwhat did you say
fooBot
I said " I SAID I SAID HI THERE ".
Friendwhat did you say
fooBot
I said " I SAID HI THERE ".
Friendwhat did you ask before that
fooBot
I said " HI THERE ".
Friendwhat did you say
fooBot
I said " HI THERE ".
Friendgreetings
fooBot
Hi there

Please note that the increasing number of “I said” in each newer response is normal, as I’m asking questions based on previous responses.

For the most part, I followed the AIML in the original order, except for the first time I asked about what the bot said. The AIML categories, as given, were a little out of order (this DOES NOT MATTER, as far as Program O is concerned), so I mentally rearranged them in order to have the logs make sense.

Now… As you can see, my install of Program O is working as expected, so let’s see what we can find about your install. First off, remember the specs I laid out at the beginning of my post? I need you to provide me those same specifications for your Program O install, so that I can give it a try on one of my virtual machines that most closely matches your setup. then I need you to look in the logs folder and see if there are any log files being generated. If there are, then I’ll need to see them in order to find out what’s going on. Get me these things and we can move forward. smile

 

 
  [ # 3 ]

Yeah, hmm it seems that it works ok, if I use so: <that index=“1”> and <that index=“2”> but hmm, it will give me same result as yours which is uppercase sentences. I have some text with emojis for example with this “I am happy. :smiley:”.
If I ask the bot what did you say then I get this: I said, “I AM HAPPY. SMILEY”.
I don’t get the same text.
I tried use <denormalize> but it seems program-o doesn’t recognize. I used so <denormalize><that index=“1”></denormalize>.
There is a possible solution that I get the same text without convert to uppercase? Because I tried also with <formal> but nope, not the same, every word first letter are big letter.

 

 
  [ # 4 ]

The <denormalize> tag isn’t part of AIML 1.0, which is what Program O supports right now, so that tag won’t work. That said, I think it should return what the bot said exactly, and not the “normalized” version of what it said. I’ll look into correcting that.

It still sounds like you may be experiencing a bug though. If the AIML you are using contains <that> tags with split indexes (e.g. with indexes like “1,1” or “2,1”) and it’s parsing those as empty strings (which was your original problem, it seems), then there is an issue that I would like to address. However, I cannot do that without the information I requested in my previous post. If you could please provide that information (Operating system, server software and version, PHP version and the version of Program O that you have) I can do some testing to see if I can fix it. Thanks. smile

 

 
  [ # 5 ]

Hmm I see, than I must wait to Program-O version 3 probably.

Operation system: Windows 10 Home
PHP version: 7.1.6
Mysql version: 5.5.5-10.1.24-MariaDB
Apache version: 2.4.25 (Win32)
I downloaded from here: https://www.apachefriends.org/en/download.html

Program-O version: 2.6.7 (Master Branch)

 

 
  [ # 6 ]

Ok, I found a solution to uppercase text. I used: <sentence><that index=“2”></sentence> . Now the text is normal but the emoticons doesn’t come with correct form.
Now my text appear so: I said, “I am happy smiley” instead “I am happy. :smiley:”
So the . and : missing. This is same with comma and with other special character.

 

 
  [ # 7 ]

I’ve created an issue for this on GitHub, and submitted a fix for this to address it. You will no longer need to use the <sentence> tag, and your emojis should now parse properly. this bug fix is in the DEV branch, where we do all of the bug fixes, so I recommend switching to that branch and downloading the most recent version. Please give it a try and let me know how it goes. smile

 

 
  [ # 8 ]

Yeah, it works now. Thank you very much for help and bugfix. smile

 

 
  login or register to react
‹‹ Check if set the value      Name undefined ››