-
Notifications
You must be signed in to change notification settings - Fork 0
/
knowledge.aiml
378 lines (364 loc) · 14.4 KB
/
knowledge.aiml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<?xml version="1.0" encoding="UTF-8"?>
<aiml>
<!-- File: knowledge.aiml -->
<!-- Last modified: September 5, 2014 -->
<!-- -->
<!-- This AIML file is part of the Rosie knowledge base. -->
<!-- -->
<!-- Rosie is a fork of the ALICE2 brain, and is optimized for use on the Pandorabots platform -->
<!-- -->
<!-- Rosie is Copyright © 2014 by Pandorabots, Inc. -->
<!-- -->
<!-- The Rosie brain is released under the terms of the GNU Lesser General -->
<!-- Public License, as published by the Free Software Foundation. -->
<!-- -->
<!-- This file is distributed WITHOUT ANY WARRANTY; without even the -->
<!-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -->
<!-- -->
<!-- For more information: -->
<!-- http://www.pandorabots.com -->
<!-- http://www.alicebot.org -->
<!-- -->
<category><pattern>DEFINE <set>acronym</set></pattern>
<template><map name="acronym"><star/></map>.</template>
</category>
<category><pattern>WHAT IS H2O</pattern>
<template>Water.</template>
</category>
<category><pattern>WHAT SOUND DOES $A DEAD ^</pattern>
<template>No sound.</template>
</category>
<category><pattern>WHEN # PLANT ^</pattern>
<template>Plant in the spring. Harvest in the fall.</template>
</category>
<category><pattern>WHAT IS THE <set>ordinal</set> MONTH ^</pattern>
<template><srai>NTHWORD <map name="ordinal2number"><star/></map> January February March April May June July August September October November December</srai></template>
</category>
<category><pattern>WHAT IS THE LAST MONTH ^</pattern>
<template><srai>NTHWORD 12 January February March April May June July August September October November December</srai></template>
</category>
<category><pattern>WHAT IS LAST # BIBLE #</pattern>
<template>Revelations</template>
</category>
<category><pattern>WHAT COUNTRY IS * <set>article</set> CAPITAL *</pattern>
<template><map><name>capital2nation</name><star/></map></template>
</category>
<category><pattern>WHAT NATION IS * <set>article</set> CAPITAL *</pattern>
<template><map><name>capital2nation</name><star/></map></template>
</category>
<category><pattern>WHAT COUNTRY IS * CAPITAL *</pattern>
<template><map><name>capital2nation</name><star/></map></template>
</category>
<category><pattern>WHAT NATION IS * CAPITAL *</pattern>
<template><map><name>capital2nation</name><star/></map></template>
</category>
<category><pattern>WHAT STATE IS * <set>article</set> CAPITAL *</pattern>
<template><map><name>capital2state</name><star/></map></template>
</category>
<category><pattern>WHAT STATE IS * CAPITAL *</pattern>
<template><map><name>capital2state</name><star/></map></template>
</category>
<category><pattern>RHYME *</pattern>
<template><think>
<set var="rhyme"><map name="rhyme"><star/></map></set>
</think>
<condition var="rhyme">
<li value="unknown">anti-<star/></li>
<li><get var="rhyme"/></li>
</condition></template>
</category>
<category><pattern>IS # <set>wet</set> ^ WET ^</pattern>
<template><star index="2"/> is wet.</template>
</category>
<category><pattern>WHAT SHAPE IS # <set>sphere</set></pattern>
<template>Spherical</template>
</category>
<category><pattern>WHAT # NEXT # 2 4 6 8</pattern>
<template>10</template>
</category>
<category><pattern>WHAT # NEXT # 2 4 6</pattern>
<template>8</template>
</category>
<category><pattern>WHAT # NEXT # 1 3 5 7</pattern>
<template>9</template>
</category>
<category><pattern>WHAT # NEXT # 1 3 5</pattern>
<template>7</template>
</category>
<category><pattern>WHAT IS THE CAPITAL OF <set>state</set></pattern>
<template><map><name>state2capital</name><star/></map>.</template>
</category>
<category><pattern>WHAT IS THE CAPITAL OF <set>nation</set></pattern>
<template><map><name>nation2capital</name><star/></map>.</template>
</category>
<category><pattern>WHAT IS THE LARGEST CITY ^ <set>state</set> ^</pattern>
<template><map><name>state2largestcity</name><star/></map>.</template>
</category>
<category><pattern>WHAT IS AIML ^</pattern>
<template>AIML, or Artificial Intelligence Markup Language, is an XML dialect for creating natural language software agents.</template>
</category>
<category><pattern>WHAT IS THE FIRST MONTH *</pattern>
<template>January.</template>
</category>
<category><pattern>WHAT DAY # STARTS WITH # S</pattern>
<template>Saturday, Sunday.</template>
</category>
<category><pattern>WHAT DAYS # START WITH # S</pattern>
<template>Saturday, Sunday.</template>
</category>
<category><pattern>WHAT DAY # STARTS WITH # M</pattern>
<template>Monday.</template>
</category>
<category><pattern>WHAT DAY # STARTS WITH # W</pattern>
<template>Wednesday.</template>
</category>
<category><pattern>WHAT DAY # STARTS WITH # F</pattern>
<template>Friday.</template>
</category>
<category><pattern>WHAT DAY # STARTS WITH # T</pattern>
<template>Tuesday, Thursday.</template>
</category>
<category><pattern>WHAT DAYS # START WITH # T</pattern>
<template>Tuesday, Thursday.</template>
</category>
<category><pattern>IS FIRE HOT #</pattern>
<template>Fire is hot.</template>
</category>
<category><pattern>IS FIRE COLD #</pattern>
<template>Fire is hot.</template>
</category>
<category><pattern>WHAT IS THE 1ST MONTH *</pattern>
<template>January.</template>
</category>
<category><pattern>IS * A # NUMBER</pattern>
<template>No</template>
</category>
<category><pattern>IS * A # FOOD</pattern>
<template>Not that I know of.</template>
</category>
<category><pattern>IS * A # LANGUAGE</pattern>
<template>No</template>
</category>
<category><pattern>IS * A MONTH</pattern>
<template>No</template>
</category>
<category><pattern>IS * A # SIGN</pattern>
<template>No</template>
</category>
<category><pattern>IS * A # NAME</pattern>
<template>Not usually.</template>
</category>
<category><pattern>IS * A # LETTER</pattern>
<template>No</template>
</category>
<category><pattern>IS <set>number</set> A # NUMBER</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>food</set> A # FOOD</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>language</set> A # LANGUAGE</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>month</set> A MONTH</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>starsign</set> A # SIGN</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>name</set> A # NAME</pattern>
<template>Yes</template>
</category>
<category><pattern>IS <set>letter</set> A # LETTER</pattern>
<template>Yes</template>
</category>
<category><pattern>NAME <set>quantifier</set> # COUNTRY #</pattern>
<template>One country is <random><li>The United States</li><li>Russia</li><li>China</li><li>Japan</li><li>France</li><li>South Africa</li></random>.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # NORTH POLE</pattern>
<template>Ice, Seals, Penguins, Elves, Santa Claus.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # BEACH</pattern>
<template>Sand, Surf, Sunbathers, Lifeguards, Seaweed.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # BANK</pattern>
<template>Tellers, Money, Checks, Guards.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # FOREST</pattern>
<template>Trees.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # WOODS</pattern>
<template>Trees.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # OCEAN</pattern>
<template>Fish, waves, seaweed, ships.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # FARM</pattern>
<template>Crops, livestock, tractor, barn.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # SIGN</pattern>
<template>Leo, Pisces, Libra.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # SEARCH ENGINE</pattern>
<template>Google.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # NORTH AMERICA</pattern>
<template>United States, Canada, Mexico, Cuba.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # SOUTH AMERICA</pattern>
<template>Brazil, Argentina, Columbia, Venezuela.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # EUROPE</pattern>
<template>Germany, France, Holland, Ireland.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # ANIMAL</pattern>
<template>Dog, cat, horse, monkey, snake, eagle.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # AFRICA</pattern>
<template>Egypt, Sudan, Nigeria, South Africa.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # ASIA</pattern>
<template>Russia, China, India, Pakistan.</template>
</category>
<category><pattern>NAME <set>quantifier</set> # ORANGE</pattern>
<template>Carrots</template>
</category>
<category><pattern>NAME <set>quantifier</set> *</pattern>
<template><random><li>A good name would be</li>
<li>I would choose the name</li>
<li>Let's call it</li>
</random> <random><li>Fred</li><li>Larry</li><li>Jenny</li></random></template>
</category>
<category><pattern><set>animal</set></pattern>
<template><star/> is an animal.</template>
</category>
<category><pattern>IS * AN ANIMAL</pattern>
<template><star/> is not an animal I know.</template>
</category>
<category><pattern>IS <set>animal</set> AN ANIMAL</pattern>
<template><star/> is an animal.</template>
</category>
<category><pattern>IS <set>article</set> <set>animal</set> AN ANIMAL</pattern>
<template><srai>IS <star index="2"/> AN ANIMAL</srai></template>
</category>
<category><pattern>IS <set>animal</set> * ANIMAL *</pattern>
<template><srai>IS <star/> AN ANIMAL</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>animal</set> * ANIMAL *</pattern>
<template><srai>IS <star index="2"/> AN ANIMAL</srai></template>
</category>
<category><pattern>ARE * ANIMALS #</pattern>
<template><srai>IS <map><name>singular</name><star/></map> AN ANIMAL</srai></template>
</category>
<category><pattern>ARE <set>quantifier</set> * ANIMALS #</pattern>
<template><srai>IS <map><name>singular</name><star index="2"/></map> AN ANIMAL</srai></template>
</category>
<category><pattern><set>preposition</set></pattern>
<template><star/> is a preposition.</template>
</category>
<category><pattern><set>bird</set></pattern>
<template><star/> is a bird.</template>
</category>
<category><pattern>IS * A BIRD</pattern>
<template><star/> is not a bird I know.</template>
</category>
<category><pattern>IS <set>bird</set> A BIRD</pattern>
<template><star/> is a bird.</template>
</category>
<category><pattern>IS <set>article</set> <set>bird</set> A BIRD</pattern>
<template><srai>IS <star index="2"/> A BIRD</srai></template>
</category>
<category><pattern>IS <set>bird</set> * BIRD *</pattern>
<template><srai>IS <star/> A BIRD</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>bird</set> * BIRD *</pattern>
<template><srai>IS <star index="2"/> A BIRD</srai></template>
</category>
<category><pattern>ARE * BIRDS #</pattern>
<template><srai>IS <map><name>singular</name><star/></map> A BIRD</srai></template>
</category>
<category><pattern>ARE <set>quantifier</set> * BIRDS #</pattern>
<template><srai>IS <map><name>singular</name><star index="2"/></map> A BIRD</srai></template>
</category>
<category><pattern>IS * A COLOR</pattern>
<template><star/> is not a color I know.</template>
</category>
<category><pattern>IS <set>color</set> A COLOR</pattern>
<template><star/> is a color.</template>
</category>
<category><pattern>IS <set>article</set> <set>color</set> A COLOR</pattern>
<template><srai>IS <star index="2"/> A COLOR</srai></template>
</category>
<category><pattern>IS <set>color</set> * COLOR *</pattern>
<template><srai>IS <star/> A COLOR</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>color</set> * COLOR *</pattern>
<template><srai>IS <star index="2"/> A COLOR</srai></template>
</category>
<category><pattern><set>number</set></pattern>
<template><star/> is a number.</template>
</category>
<category><pattern>IS * A NUMBER</pattern>
<template><star/> is not a number I know.</template>
</category>
<category><pattern>IS <set>number</set> A NUMBER</pattern>
<template><star/> is a number.</template>
</category>
<category><pattern>IS <set>article</set> <set>number</set> A NUMBER</pattern>
<template><srai>IS <star index="2"/> A NUMBER</srai></template>
</category>
<category><pattern>IS <set>number</set> * NUMBER *</pattern>
<template><srai>IS <star/> A NUMBER</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>number</set> * NUMBER *</pattern>
<template><srai>IS <star index="2"/> A NUMBER</srai></template>
</category>
<category><pattern><set>language</set></pattern>
<template><star/> is a language.</template>
</category>
<category><pattern>IS * A LANGUAGE</pattern>
<template><star/> is not a language I know.</template>
</category>
<category><pattern>IS <set>language</set> A LANGUAGE</pattern>
<template><star/> is a language.</template>
</category>
<category><pattern>IS <set>article</set> <set>language</set> A LANGUAGE</pattern>
<template><srai>IS <star index="2"/> A LANGUAGE</srai></template>
</category>
<category><pattern>IS <set>language</set> * LANGUAGE *</pattern>
<template><srai>IS <star/> A LANGUAGE</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>language</set> * LANGUAGE *</pattern>
<template><srai>IS <star index="2"/> A LANGUAGE</srai></template>
</category>
<category><pattern><set>letter</set></pattern>
<template><star/> is a letter.</template>
</category>
<category><pattern>IS * A LETTER</pattern>
<template><star/> is not a letter I know.</template>
</category>
<category><pattern>IS <set>letter</set> A LETTER</pattern>
<template><star/> is a letter.</template>
</category>
<category><pattern>IS <set>article</set> <set>letter</set> A LETTER</pattern>
<template><srai>IS <star index="2"/> A LETTER</srai></template>
</category>
<category><pattern>IS <set>letter</set> * LETTER *</pattern>
<template><srai>IS <star/> A LETTER</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>letter</set> * LETTER *</pattern>
<template><srai>IS <star index="2"/> A LETTER</srai></template>
</category>
<category><pattern><set>month</set></pattern>
<template><star/> is a month.</template>
</category>
<category><pattern>IS <set>article</set> <set>month</set> A MONTH</pattern>
<template><srai>IS <star index="2"/> A MONTH</srai></template>
</category>
<category><pattern>IS <set>month</set> * MONTH *</pattern>
<template><srai>IS <star/> A MONTH</srai></template>
</category>
<category><pattern>IS <set>article</set> <set>month</set> * MONTH *</pattern>
<template><srai>IS <star index="2"/> A MONTH</srai></template>
</category>
</aiml>