Download presentation
Presentation is loading. Please wait.
1
AIML A I Markup Language
2
CATEGORIES Basic knowledge unit Stimulus is called the pattern
Response is called the template <category> <pattern> …. </pattern> <template>…… <template> </category>
3
Wildcards * and _ means match a word of input
Matching order is different (_ word *) <star/> accesses the matched word <star index = index /> for multiple wildcards
4
Context “that” “topic” <that> </that>
matches the last utterance of the bot Occurs inside the category “topic” <topic> </topic> Occurs outside a set of categories Groups related sets of categories
5
Context Usage Pattern Side That
<category> <pattern> …. </pattern> <that> … </that> <template>…… <template> </category>
6
Context Template Side That
“that” appears in a template No content! Just an attribute with integer or list of integers (don’t forget to make a string!) <that index=../> Outputs the past utterences
7
Recursion Symbolic Reduction Divide and Conquer
Spelling or grammar corrections Keyword detection anywhere in the input Conditionals Synonyms
8
Recursion <srai> </srai>
Warning – infinite loops are possible Symbolic reduction: <category> <pattern>DO YOU KNOW WHO * IS</pattern> <template><srai>WHO IS <star/></srai></template> </category>
9
Divide and Conquer <category> <pattern>YES *</pattern> <template><srai>YES</srai> <sr/></template> </category>
10
Synonyms <category> <pattern>HELLO</pattern> <template>Hi there!</template> </category> <category> <pattern>HI</pattern> <template><srai>HELLO</srai></template> </category>
11
Keyword <category> <pattern>MOTHER</pattern> <template> Tell me more about your family. </template> </category> <category> <pattern>_ MOTHER</pattern> <template> Tell me more about your family. </template> </category> <category> <pattern>MOTHER _</pattern> <template> Tell me more about your family. </template> </category>
12
Conditionals – using <srai>
<category> <pattern>Who is he</pattern> <template> <srai>whoishe <get name=“he”/></srai> </template> </category>
13
Conditionals Single: <condition name=“X“ value=“Y”>
<li> </li> </condition> Multiple: <condition name=“X“> <li value=“Y”> </li> <li value=“Z”> </li> <condition> <li name = “X” value = “Y”> …. </li>
14
Return Random Responce
<template> <random> <li> .. </li> <li> … </li> </random> </template>
15
Predicates Get Set There are other predicates! <get name= …/>
returns value assigned to the name Empty string if no value has been assigned Set <set name = … > contents </set> There are other predicates!
16
Targeting A design strategy
Examine the user input If one person input a sentence – odds are good some else will!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.