AIML v2: Pandorabots - Two words keyword

107 Views Asked by At

When I try to use FAVOURITE GAME as keyword in AIML v2 (using Pandorabots) I get matches from * category, but not favourite game category. I have no idea what can be wrong.

For example for favourite game I get: Sorry, could you repeat in an other way?

<aiml>
  <!--POWITANIE-->
    <category>
        <pattern>HI #</pattern>
        <template>
            <random>
                <li>Yo!</li>
                <li>Hello!</li>
                <li>Welcome to my chatroom man</li>
                <li>Hi</li>
                <li>Nice to meet you, I'm Alfred</li>
            </random>
        </template>
    </category>
 
    <!--ULUBIONA GRA-->
    <category>
        <pattern># FAVOURITE # GAME #</pattern>
        <template> My favourite game is Starcraft2, and your? </template>
    </category>

      <!--NA BEZSENSOWNY INPUT-->
     <category>
        <pattern>*</pattern>
        <template>
            <random>
                <li>I have no idea what to say to you.</li>
                <li>I don't understand you.</li>
                <li>Sorry, could you repeat in an other way?</li>
            </random>
        </template>
    </category>

</aiml>
1

There are 1 best solutions below

2
On BEST ANSWER

If you say, "FAVORITE GAME" to your bot (without the U), I would strongly suspect the category would work. By default, the normal.substitution file for your bot will contain this entry:

["favourite", "favorite"],

This means that whenever anyone says, "FAVOURITE", the bot thinks you mean, "FAVORITE".

If you remove this entry, your bot will recognise "favourite" instead of "favorite" and your pattern will match.