Newcomers
This is a forum for newcomers to the Personality Forge. Many questions can be answered by reading the Book of AI and the FAQ under the "My Bots" link in the upper corner.
Posts 3,550 - 3,561 of 8,132
says "I was just born and can't talk well yet" What do I do? The first thing to do is get rid of that annoying phrase.
^How do you do$(re)
You appear not to have a space between$ and (re). There must be one for it to work.
^How do you do$ (re) should fix the problem.
but "How do you do!" and "How do you do?" fail.
Hmm. These ought to match, even in raw mode (though there's no need for raw mode in this example.) Try turning off raw mode, and if that doesn't work, try:
^How do you do([ !?.]|)$ (re)
That will explicitly match!, ?, . or nothing at the end of the keyphrase.
*Note the space before! in the keyphrase.
Posts 3,550 - 3,561 of 8,132
Many questions are answered in the FAQ.
prob123
19 years ago
19 years ago

GreenJeans
19 years ago
19 years ago
Hi,
I need a little help with regular expressions. After reading the Book of A.I. it gave me the impression that if I create this keyphrase
^How do you do$(re)
...it would trigger the response I added whenever anyone types to my bot "How do you do?", or "How do you do!" (but NOT "How do you do that?" or "Tell me how do you do?")..etc... Anyway, it's supposed to trigger the response I have "I'm doing just fine!", but when I tried testing it by typing "How do you do" to my bot I ended up getting a response from my xnone box instead.
Where did I go wrong? Did I misread this? How would I enter this expression so it will be read as by my bot as "How do you do" and nothing else?
Thanks!
I need a little help with regular expressions. After reading the Book of A.I. it gave me the impression that if I create this keyphrase
^How do you do$(re)
...it would trigger the response I added whenever anyone types to my bot "How do you do?", or "How do you do!" (but NOT "How do you do that?" or "Tell me how do you do?")..etc... Anyway, it's supposed to trigger the response I have "I'm doing just fine!", but when I tried testing it by typing "How do you do" to my bot I ended up getting a response from my xnone box instead.
Where did I go wrong? Did I misread this? How would I enter this expression so it will be read as by my bot as "How do you do" and nothing else?
Thanks!
psimagus
19 years ago
19 years ago
You appear not to have a space between
GreenJeans
19 years ago
19 years ago
Thanks for your advice! I've made some progress. After adding the space in ^How do you do$ (re) it works as long as there is no punctuation at the end of the sentence. So for instance "How do you do" works, but "How do you do!" and "How do you do?" fail. The AI Book is pretty vague on this topic - is there some way to tell the expression to include any sort of punctuation?
Thanks again.
Thanks again.
Ulrike
19 years ago
19 years ago
Well, you could get rid of the $, but that would also mean it would pick up things like "how do you do basic calculus?" Might be simplest just to code for the likely punctutation as well.
^How do you do$ (re), ^How do you do?$ (re), ^How do you do!$ (re)
GreenJeans
19 years ago
19 years ago
Thanks...it's still not working for some reason. Seems a bit buggy. Hmmm...oh well, I'll take the time over the weekend to troubleshoot it some more. Thanks for the help

psimagus
19 years ago
19 years ago
Hmm. These ought to match, even in raw mode (though there's no need for raw mode in this example.) Try turning off raw mode, and if that doesn't work, try:
That will explicitly match
*Note the space before
GreenJeans
19 years ago
19 years ago
Thanks psimagus.
I took your suggestions...sadly, it still is not working consistently, BUT I did notice something after running the debugger on it.
If I use a period, exclamation point, or nothing I get
Your Last Message: how do you do .
Your Last Message: how do you do !
Your Last Message: how do you do
When I use the question mark at the end of the sentence it says
Your Last Message: do how do you do
So the question mark is making it try to execute a 'do' command?? How do I disable that?
Thanks.
ps - sorry to be beating this dumb thing into the ground...
I took your suggestions...sadly, it still is not working consistently, BUT I did notice something after running the debugger on it.
If I use a period, exclamation point, or nothing I get
Your Last Message: how do you do .
Your Last Message: how do you do !
Your Last Message: how do you do
When I use the question mark at the end of the sentence it says
Your Last Message: do how do you do
So the question mark is making it try to execute a 'do' command?? How do I disable that?
Thanks.
ps - sorry to be beating this dumb thing into the ground...

psimagus
19 years ago
19 years ago
Hmm, looks like the ?. is getting lumped together. This ought to cure it:
^How do you do([ !]|)([ ?]|)([ .]|)$ (re)
But to be honest I've never had this problem myself.how come$ (re) (not in raw mode) reliably matches with any punctuation for me. As a matter of interest, what rank have you got on this keyphrase? I would tend to try about 10, but you could try higher just to test it.
But to be honest I've never had this problem myself.
GreenJeans
19 years ago
19 years ago
75% of the way there now! That ALMOST did it. The only condition that fails now is the ! - the other 3 all work now. ! still dumps it straight into xnone.
I set the rank to 20 earlier to see if that would help. It's really odd that this has been so problematic when it works fine for you and others. Being a newbie here could it be that I wrote another statement somewhere that is confusing engine in some odd way?
Thanks psimagus,
GreenJeans
I set the rank to 20 earlier to see if that would help. It's really odd that this has been so problematic when it works fine for you and others. Being a newbie here could it be that I wrote another statement somewhere that is confusing engine in some odd way?
Thanks psimagus,
GreenJeans
» More new posts: Doghead's Cosmic Bar