A simple example HELLO Hi there! Type in: hello. YourBot responds with: Hi there!
-
Upload
amice-boyd -
Category
Documents
-
view
213 -
download
0
description
Transcript of A simple example HELLO Hi there! Type in: hello. YourBot responds with: Hi there!
A simple example
<category><pattern>HELLO</pattern><template>Hi there!</template>
</category>
Type in:hello.YourBot responds with:Hi there!
Symbolic Reduction
<category><pattern>HI</pattern><template>
<srai>HELLO</srai></template>
</category>
Some statements/questions are essentially the same in meaning as others
<srai> tag = “same response as if”
Random answers<category>
<pattern>HOW ARE YOU</pattern> <template>
<random><li>Awful</li><li>Fine</li><li>Not too bad</li><li>How are you?</li>
</random> </template></category>
Pattern matching
Wildcards<category>
<pattern>I DON’T LIKE *</pattern><template>That’s crazy. I think <star/> is wonderful.</template>
</category>
User: I don’t like having my teeth pulled.Bot: That’s crazy. I think having my teeth pulled is
wonderful.
Wildcard matching
<category><pattern>I PREFER * OVER *</pattern><template>I disagree. <star index=“2”> is much better
than <star index=“1”>.</template></category>
User: I prefer Ford over Holden.Bot: I disagree. Holden is much better than Ford.
Storing information
Can store information with <set/>:
<category>
<pattern>MY NAME IS *</pattern><template>Hello <set name=“yourName”>
<star/></set>. </template>
</category>
Using stored information
and retrieve information with <get/>
<category>
<pattern>WHO AM I</pattern><template>I believe your name is <get name
= “yourName”/></template>
</category>
That
<category>
<pattern>YES</pattern><that>DO YOU LIKE MOVIES</that><template>Let’s go to the movies
then</template></category>
Bot: Do you like moviesUser: YesBot: Let’s go to the movies then
Think
Suppresses output from being printed on screen
<category> <pattern>I AM FEMALE</pattern> <template>
Thanks for telling me your gender. <think><set name=“gender”>female</set></think>
</template></category>
Condition
<category> <pattern>I AM BLOND</pattern> <template>You sound very
<condition name="gender" value="female"> attractive.
</condition> <condition name="gender" value="male">
handsome.</condition>
</template></category>
Changing person
Very useful in paraphrasing what the user says person2 swaps 1st (“I”) and 2nd person (“you”) around<category>
<pattern>I AM *</pattern> <template>What do you mean, <person2><input/><person2>?
</template></category>
User: I am very happy to meet you.Bot: What do you mean, you are very happy to meet me?
Nonverbal Behaviour
Put {EMOTE xxx} into your responses to trigger facial expressionswhere xxx is a valid facial expression
You can queue multiple expressions within the EMOTE statement{EMOTE xxx yyy zzz}
You can increase the duration of each expression{EMOTE xxx 0.5}
Expression extended by half a second!
Valid Expressions (+ Default Length)
absent (5.0 sec)anger (1.5 sec)bigeyes (1.0 sec) biggrin (3.0 sec) bigsad (4.0 sec)blink (0.2 sec)bliss (2.0 sec)brows (1.2 sec)downeyes (1.0 sec) downnod (0.8 sec)fear (1.5 sec) frust (2.0 sec)grin (1.5 sec)happy (2.0 sec)insulted (2.0 sec)leftblink (0.2 sec)leftbrow (2.0 sec)
lefteyes (1.5 sec)lemon (3.0 sec)longkiss (3.0 sec)neutral (0 sec)rightblink (0.2 sec)rightbrow (2.0 sec)righteyes (1.5 sec)sad (2.0 sec)shock (1.5 sec)shortkiss (0.3 sec)sleepy (5.0 sec)surprise (1.0 sec)upeyes (1.0 sec)upnod (0.8 sec)wink (1.0 sec)wonder (2.0 sec)yeahright (5.0 sec)
EMOTE Caveats
{EMOTE} can be defined anywhere in a chatbot response, but…
{EMOTE} will always play an expression from the beginning of the response…or from the last {BREAK} statement!
{BREAK 0.5} will pause the speech for 0.5 seconds (NB: you do not have to specify a time; zero is default)
Any {EMOTE} after a {BREAK} will play after this pause
EMOTE Examples
<category><pattern>SMILE AND FROWN FOR ME</pattern><template> {EMOTE happy 1.0 sad 1.0}</template></category>
<category><pattern>SMILE FOR ME WHILE TALKING</pattern><template> Okay, I will do that. {EMOTE happy 1.0}</template></category> <category><pattern>SMILE FOR ME AFTER TALKING</pattern><template> Okay, I will do that. {BREAK} {EMOTE happy 1.0} </template></category>
<category><pattern>SHOW ME SOME EMOTIONS</pattern><template> {EMOTE bliss} {BREAK} Did you feel like this? {BREAK 0.5} Or is this what you feel? {BREAK} {EMOTE anger} {BREAK} Make up your mind! </template></category>