Question about Program E's matching engine

Help
2003-02-14
2013-04-25
  • Jonathan Duay

    Jonathan Duay - 2003-02-14

    Im encountering problems with the matching on my program E bot.  The '*' inputs seem to have some sort of bug. for example, i have a pattern "feeding *", and I input 'feeding children', when i check the logs on the database, the input passed on is "feeding children children", thus resulting in no matches found. anyone here encounter any problems with the pattern matching engine???

     
    • Anonymous - 2003-06-16

      I've noticed the same problem. If * matches one word it works fine, but if it matches more than one word if repeats the extra words. for example:

      Input: what is one two three
      Pattern: what is *

      * is matched to: one two three two three

      This happens in version 0.08 but not version 0.07.

      BTW Is anyone still working on this thing?

       
    • Anonymous - 2003-06-16

      been doing a bit of playing, and I think I've fixed it, atleast for my problems

      in <b>src/graphnew.php</b>
      I added 1 character:

      used to be: $newword=fastforward($word,&$ffremains);

      is now: $newword=fastforward($word,<b>&</b>$ffremains);

      Seems to work for me, don't know if it's broken anything else though.

       
    • tanoshimi

      tanoshimi - 2005-04-04

      Thanks for posting the solution above Richard although I think the HTML formatting went a bit screwy in your reply. Just to clarify for anybody else stuck on this - there appear to two lines in src/graphnew.php which require changing... at line 212 and 319 it currently says:
      $newword=fastforward($word,$ffremains);           

      which if changed to: $newword=fastforward($word,&$ffremains);

      seems to fix pattern matching for multiple words in *.

      I don't pretend to understand how this works, but I'm sure as hell enjoying creating AIML content for my bot to learn. Serious kudos to everybody involved in this project....

      a.

       
      • tanoshimi

        tanoshimi - 2005-09-25

        Sorry to cross-post in the forum as well as in the 'Bugs' page, but I've been banging my head against a brick wall trying to debug some odd responses, when I noticed something odd...

        While the solution above seems to fix problems in categories containing only one <star />, I'm having problems with the following category:

        <category>
        <pattern>* VERY *</pattern>
        <template>
        <star index="1"/> <star index="2"/>
        </template>
        </category>

        Which is creating the following dialogue:
        ****
        User: I am very clever
        Bot: Very clever am very clever
        ****

        Anybody else come across this, or can help?!

         
        • Ikioi

          Ikioi - 2006-06-30

          I'm using 0.9, and I have the same problem.  The '&' does nothing to help.

           
    • Calipsy

      Calipsy - 2005-04-05

      Hello

      I followed your suggestion and It fixed the problem of repeating words on my bot.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks