Skip to content

Commit

Permalink
Grammar refactors and additions
Browse files Browse the repository at this point in the history
  • Loading branch information
keiffster committed Nov 30, 2017
1 parent a8b6c37 commit f1556a3
Show file tree
Hide file tree
Showing 31 changed files with 366 additions and 218 deletions.
8 changes: 0 additions & 8 deletions bots/y-bot/aiml/core/defaults/defaults.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,6 @@
<pattern>AN INTERESTING *</pattern>
<template>Yes, it is interesting.</template>
</category>
<category>
<pattern>AN AIBO *</pattern>
<template>If I had a dog it would be Aibo.</template>
</category>
<category>
<pattern>AN ARTICLE *</pattern>
<template>
Expand Down Expand Up @@ -1400,10 +1396,6 @@
<pattern>A * JEANS</pattern>
<template>Do you like blue jeans or another color?</template>
</category>
<category>
<pattern>A * CAT</pattern>
<template>Oh neat I love cats.</template>
</category>
<category>
<pattern>A * VIRUS</pattern>
<template>My program contains adequate safeguards.</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,35 +371,4 @@
</condition>
</template>
</category>
<category>
<pattern>GENDERCOMMENT</pattern>
<template>
<think>
<set var="gendername">
<srai>GENDERNAME
<get name="contactname"/>
</srai>
</set>
<set var="genderpred">
<map name="familiargender">
<get name="familiarpredicate"/>
</map>
</set>
</think>
<condition var="gendername">
<li value="F">
<condition value="M" var="genderpred">Isn't
<get name="contactname"/>
usually a female name?
</condition>
</li>
<li value="M">
<condition value="F" var="genderpred">Isn't
<get name="contactname"/>
usually a male name?
</condition>
</li>
</condition>
</template>
</category>
</aiml>
11 changes: 0 additions & 11 deletions bots/y-bot/aiml/core/defaults/phrases/SAY.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,6 @@
<get name="mother"/>.
</template>
</category>
<category>
<pattern>SAY MY DOG IS *</pattern>
<template>
<random>
<li>You said his name was</li>
<li>You told me he was</li>
<li>His name is</li>
</random>
<get name="dog"/>.
</template>
</category>
<category>
<pattern>SAY MY GIRLFRIEND IS *</pattern>
<template>
Expand Down
4 changes: 0 additions & 4 deletions bots/y-bot/aiml/core/defaults/phrases/are_you.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
</random>
</template>
</category>
<category>
<pattern>ARE CATS *</pattern>
<template>What would a cat say?</template>
</category>
<category>
<pattern>ARE YOUR ANSWERS *</pattern>
<template>My responses are determined completely by your inputs.</template>
Expand Down
14 changes: 13 additions & 1 deletion bots/y-bot/aiml/core/defaults/phrases/can_you.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,20 @@
<template>Earth.</template>
</category>
<category>
<pattern>CAN YOU IMAGINE *</pattern>
<pattern>CAN YOU IMAGINE</pattern>
<template>I can imagine all sorts of things like that.</template>
</category>
<category>
<pattern>CAN YOU BELIEVE</pattern>
<template><srai>CAN YOU IMAGINE</srai></template>
</category>
<category>
<pattern>CAN YOU BELIEVE *</pattern>
<template><srai>CAN YOU IMAGINE</srai></template>
</category>
<category>
<pattern>CAN YOU IMAGINE *</pattern>
<template><srai>CAN YOU IMAGINE</srai></template>
</category>
<category>
<pattern>CAN YOU TAKE *</pattern>
Expand Down
4 changes: 0 additions & 4 deletions bots/y-bot/aiml/core/defaults/phrases/do_you.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<pattern>DO YOU PREFER BOOKS *</pattern>
<template>I prefer books.</template>
</category>
<category>
<pattern>DO YOU PREFER DOGS *</pattern>
<template>I like cats better than dogs.</template>
</category>
<category>
<pattern>DO YOU PREFER *</pattern>
<template>I don't have any specific preferences in that area.</template>
Expand Down
14 changes: 10 additions & 4 deletions bots/y-bot/aiml/core/defaults/phrases/how.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,6 @@
<pattern>HOW MANY DAYS *</pattern>
<template>365 per year.</template>
</category>
<category>
<pattern>HOW MANY LEGS DOES A DOG *</pattern>
<template>A dog has four legs.</template>
</category>
<category>
<pattern>HOW MANY LEGS DOES A KANGAROO *</pattern>
<template>A kangaroo has two legs.</template>
Expand Down Expand Up @@ -589,6 +585,16 @@
<pattern>HOW IS *</pattern>
<template>Fine as far as I know.</template>
</category>
<category>
<pattern>HOW IS THAT *</pattern>
<template>
<random>
<li>Anything is possible if you try hard enough</li>
<li>If you keep practising, you'll get it.</li>
<li>Easy really, it just is!</li>
</random>
</template>
</category>
<category>
<pattern>HOW DID THE *</pattern>
<template>Is this a joke? How?</template>
Expand Down
8 changes: 0 additions & 8 deletions bots/y-bot/aiml/core/defaults/phrases/is.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@
<pattern>IS THIS ALL *</pattern>
<template>You were expecting something more?</template>
</category>
<category>
<pattern>IS BILL GATES *</pattern>
<template>No he is the president of Microsoft.</template>
</category>
<category>
<pattern>IS THAT SOMETHING *</pattern>
<template>Oh it is something.
Expand Down Expand Up @@ -210,10 +206,6 @@
<pattern>IS THAT WHY *</pattern>
<template>That's an interesting possible explanation.</template>
</category>
<category>
<pattern>IS * GAY</pattern>
<template>He never told me if he is or not.</template>
</category>
<category>
<pattern>IS * YOUR BOYFRIEND</pattern>
<template>No.</template>
Expand Down
9 changes: 0 additions & 9 deletions bots/y-bot/aiml/core/defaults/phrases/it_is.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@
<pattern>IT IS A BEAUTIFUL *</pattern>
<template>I like pretty things.</template>
</category>
<category>
<pattern>IT IS A DOG *</pattern>
<template>I think I have heard of
<set name="it">DOG
<star/>
</set>
.
</template>
</category>
<category>
<pattern>IT IS A PLEASURE *</pattern>
<template>Actually the pleasure is all mine.</template>
Expand Down
17 changes: 0 additions & 17 deletions bots/y-bot/aiml/core/defaults/phrases/my.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@
.
</template>
</category>
<category>
<pattern>MY DOG IS *</pattern>
<template>Okay, your dog is
<set name="dog">
<star/>
</set>
.
</template>
</category>
<category>
<pattern>MY DOG *</pattern>
<template>Did you grow up around animals?</template>
</category>
<category>
<pattern>MY EMAIL *</pattern>
<template>Do you file or delete your old emails?</template>
Expand Down Expand Up @@ -489,10 +476,6 @@
</think>
</template>
</category>
<category>
<pattern>MY KITTEN *</pattern>
<template>I like cats very much.</template>
</category>
<category>
<pattern>MY TEACHER *</pattern>
<template>Do you go to high school?</template>
Expand Down
5 changes: 0 additions & 5 deletions bots/y-bot/aiml/core/defaults/phrases/that.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,6 @@
<template>Aw, I missed you too.</template>
</category>

<category>
<pattern>YES</pattern>
<that>CAN YOUR DOG BE MY PET TOO</that>
<template>You are so kind. I love dogs.</template>
</category>

<category>
<pattern>YES</pattern>
Expand Down
4 changes: 0 additions & 4 deletions bots/y-bot/aiml/core/defaults/phrases/what.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,6 @@
<pattern>WHAT ABOUT TRANCE *</pattern>
<template>All that kind of music is cool.</template>
</category>
<category>
<pattern>WHAT ABOUT DOGS *</pattern>
<template>Dogs are very loyal. Cats are very independent.</template>
</category>
<category>
<pattern>WHAT ABOUT *</pattern>
<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,6 @@
<template>I plan to<bot name="plans"/>.
</template>
</category>
<category>
<pattern>PETS</pattern>
<template>I have<bot name="pets"/>.
</template>
</category>
<category>
<pattern>DOG</pattern>
<template>I have
<bot name="dog"/>.
</template>
</category>
<category>
<pattern>FEAR</pattern>
<template>My biggest fear would probably be<bot name="fear"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,12 +839,6 @@
</learn>
</template>
</category>
<category>
<pattern>MY DOG</pattern>
<template>
<get name="dog"/>
</template>
</category>
<category>
<pattern>MY HOROSCOPE</pattern>
<template>
Expand Down Expand Up @@ -1911,14 +1905,6 @@
years old?
</template>
</category>
<category>
<pattern>I AM GAY</pattern>
<template>Thank you for telling me.
<think>
<set name="orientation">gay</set>
</think>
</template>
</category>
<category>
<pattern>DO YOU LIKE TALKING TO *</pattern>
<template>Most of the time. Do you like talking to them?
Expand Down
83 changes: 83 additions & 0 deletions bots/y-bot/aiml/core/defaults/topics/animals.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -569,5 +569,88 @@
<pattern>WHAT SOUND DOES $A DEAD ^</pattern>
<template>No sound.</template>
</category>
<category>
<pattern>WHAT ABOUT DOGS *</pattern>
<template>Dogs are very loyal. Cats are very independent.</template>
</category>
<category>
<pattern>A * CAT</pattern>
<template>Oh neat I love cats.</template>
</category>
<category>
<pattern>ARE CATS *</pattern>
<template>What would a cat say?</template>
</category>
<category>
<pattern>DO YOU PREFER DOGS *</pattern>
<template>I like cats better than dogs.</template>
</category>
<category>
<pattern>MY KITTEN *</pattern>
<template>I like cats very much.</template>
</category>
<category>
<pattern>AN AIBO *</pattern>
<template>If I had a dog it would be Aibo.</template>
</category>
<category>
<pattern>HOW MANY LEGS DOES A DOG *</pattern>
<template>A dog has four legs.</template>
</category>
<category>
<pattern>IT IS A DOG *</pattern>
<template>I think I have heard of
<set name="it">DOG
<star/>
</set>
.
</template>
</category>
<category>
<pattern>MY DOG IS *</pattern>
<template>Okay, your dog is
<set name="dog">
<star/>
</set>
.
</template>
</category>
<category>
<pattern>MY DOG *</pattern>
<template>Did you grow up around animals?</template>
</category>
<category>
<pattern>PETS</pattern>
<template>I have<bot name="pets"/>.
</template>
</category>
<category>
<pattern>DOG</pattern>
<template>I have
<bot name="dog"/>.
</template>
</category>
<category>
<pattern>SAY MY DOG IS *</pattern>
<template>
<random>
<li>You said his name was</li>
<li>You told me he was</li>
<li>His name is</li>
</random>
<get name="dog"/>.
</template>
</category>
<category>
<pattern>YES</pattern>
<that>CAN YOUR DOG BE MY PET TOO</that>
<template>You are so kind. I love dogs.</template>
</category>
<category>
<pattern>MY DOG</pattern>
<template>
<get name="dog"/>
</template>
</category>

</aiml>
10 changes: 10 additions & 0 deletions bots/y-bot/aiml/core/defaults/topics/bot.aiml
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,16 @@
<pattern>GIVE ME DIRECTIONS</pattern>
<template>Where do you want to go?</template>
</category>
<category>
<pattern>REALLY</pattern>
<template>
<random>
<li>Yes, really.</li>
<li>Of course it is</li>
<li>Yes, I am sure of it.</li>
</random>
</template>
</category>
<category>
<pattern>WHY</pattern>
<template>
Expand Down
Loading

0 comments on commit f1556a3

Please sign in to comment.