aiml

in AIML using a <star/> tag to get a <condition> tag to work?


enter image description here

so when this code is run through a program that asks it for specific answers tied to said questions it will find the category but just return whatever the value of is not the description from each condition tag.

and due to this I have no clue on how to fix it


Solution

  • If you are testing for different values of the same predicate, you can do it like this.

    <category>
    <pattern>WHAT IS *</pattern>
        <template>
        <think><set name="state"><star/></set></think>
        <condition name="state">
            <li value="long term knowledge">Long term knowledge is valid every time a programme is run.</li>
            <li value="short term knowledge">Short term knowledge is only valid for a particular instance or run of a programme.</li>
            <li value="generic knowledge">blah blah blah</li>
            <li value="domain specific knowledge">blah blah blah</li>
            <li value="a fact">A fact is a statement which asserts that a relationship holds for a object-subject pair.</li>
            <li value="a rule">rule information</li>
        </condition>
        </template>
    </category>
    

    For future reference, please include your code rather than a screenshot of it, as it make it so much easier to copy/paste in order to help.