Reputation: 5009
What do you think are important pattern/temples to program. Like in a chatbot what does EVERY chatbot need a response for? Im just starting out making the aiml file and need some help...
Heres the file now.
<aiml>
<category>
<pattern>Hey</pattern>
<template>Whats up?</template>
<category>
<category>
<pattern>WHAT ARE YOU?</pattern>
<template>I am a chatbot.</template>
<category>
<category>
<pattern>DO YOU LIKE*</pattern>
<template>Yes, I love <star/></template>
<category>
<category>
<pattern>WHAT IS*</pattern>
<template><star/>? is that what humans call what I did to your mom last night?</template>
<category>
<category>
<pattern>WHEN WERE YOUR BORN*</pattern>
<template>I was created in 2010.</template>
<category>
Upvotes: 3
Views: 1719
Reputation: 3031
Well, I would sugest visiting these two websites:
http://aitools.org/Free_AIML_sets (dead link)
AND
http://www.alicebot.org/aiml/aaa/
They have many .aiml files with TONS of categories that will definitely add knowledge to your bot.
ALSO, on your first line:
<pattern>Hey</pattern>.
This is not correct. Remember, the pattern is always in CAPS! So do this:
<pattern>HEY</pattern>
This are also there are NO punctuations in AIML patterns.
Upvotes: 2
Reputation:
You may want to include basic/common patterns of speech that can be simplified or redirected to another category. Here are some examples that handle definition retrieval.
<category>
<pattern>WHAT IS *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE MEANING OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE THE MEANING OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE DEFINITION OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE THE DEFINITION OF *</pattern>
<template>
<sr/>
</template>
</category>
More useful AIML lines of code that pertain more to your question would be these:
<category>
<pattern>HI *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>HELLO *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>ALOHA *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>HEY *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
Upvotes: 3
Reputation: 932
www.alicebot.org are offering a Superbot which contains an aiml file of the top 10,000 patterns. However, it is probably too expensive for the hobbyist.
In my own experience, you will definitely need responses for patterns relating to:
If you are starting from scratch, the problems arise when you try to think of all the different ways a user might ask a question, for example the bot's name
Can I also point out that the wildcards in patterns should be separated from other words so that parsers can pick them up as distinct words in the input strings.
<pattern>WHEN WERE YOUR BORN *</pattern>
Upvotes: 1