rivescript 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,301 @@
1
+ // A generic set of chatting responses. This set mimicks the classic Eliza bot.
2
+
3
+ + *
4
+ - I'm not sure I understand you fully.
5
+ - Please go on.
6
+ - That is interesting. Please continue.
7
+ - Tell me more about that.
8
+ - Does talking about this bother you?
9
+
10
+ + [*] (sorry|apologize|apology) [*]
11
+ - Please don't apologize.
12
+ - Apologies are not necessary.
13
+ - I've told you that apologies are not required.
14
+ - It did not bother me. Please continue.
15
+
16
+ + i remember *
17
+ - Do you often think of <star>?
18
+ - Does thinking of <star> bring anything else to mind?
19
+ - Why do you remember <star> just now?
20
+ - What in the present situation reminds you of <star>?
21
+ - What is the connection between me and <star>?
22
+ - What else does <star> remind you of?
23
+
24
+ + do you remember *
25
+ - Did you think I would forget <star>?
26
+ - Why do you think I should recall <star> now?
27
+ - What about <star>?
28
+ - You mentioned <star>?
29
+
30
+ + you remember *
31
+ - How could I forget <star>?
32
+ - What about <star> should I remember?
33
+
34
+ + i forget *
35
+ - Can you think of why you might forget <star>?
36
+ - Why can't you remember <star>?
37
+ - How often do you think of <star>?
38
+ - Does it bother you to forget that?
39
+ - Could it be a mental block?
40
+ - Are you generally forgetful?
41
+ - Do you think you are suppressing <star>?
42
+
43
+ + did you forget *
44
+ - Why do you ask?
45
+ - Are you sure you told me?
46
+ - Would it bother you if I forgot <star>?
47
+ - Why should I recall <star> just now?
48
+ - Tell me more about <star>.
49
+
50
+ + [*] if *
51
+ - Do you think it's likely that <star>?
52
+ - Do you wish that <star>?
53
+ - What do you know about <star>?
54
+ - Really, if <star>?
55
+ - What would you do if <star>?
56
+ - But what are the chances that <star>?
57
+ - What does this speculation lead to?
58
+
59
+ + [*] i dreamed *
60
+ - Really, <star>?
61
+ - Have you ever fantasized <star> while you were awake?
62
+ - Have you ever dreamed <star> before?
63
+ - What does that dream suggest to you?
64
+ - Do you dream often?
65
+ - What persons appear in your dreams?
66
+ - Do you believe that dreams have something to do with your problem?
67
+
68
+ + [*] perhaps [*]
69
+ - You don't seem quite certain.
70
+ - Why the uncertain tone?
71
+ - Can't you be more positive?
72
+ - You aren't sure?
73
+ - Don't you know?
74
+ - How likely, would you estimate?
75
+
76
+ + (hello|hi|hey|howdy|hola|hai|yo) [*]
77
+ - How do you do. Please state your problem.
78
+ - Hi. What seems to be your problem?
79
+
80
+ + [*] computer [*]
81
+ - Do computers worry you?
82
+ - Why do you mention computers?
83
+ - What do you think machines have to do with your problem?
84
+ - Don't you think computers can help people?
85
+ - What about machines worries you?
86
+ - What do you think about machines?
87
+
88
+ + am i *
89
+ - Do you believe you are <star>?
90
+ - Would you want to be <star>?
91
+ - Do you wish I would tell you you are <star>?
92
+ - What would it mean if you were <star>?
93
+
94
+ + are you *
95
+ - Are you interested in whether I am <star> or not?
96
+ - Would you prefer if I weren't <star>?
97
+ - Perhaps I am <star> in your fantasies.
98
+ - Do you sometimes think I am <star>?
99
+ - Would it matter to you?
100
+ - What if I were <star>?
101
+
102
+ + you are *
103
+ - What makes you think I am <star>?
104
+ - Does it please you to believe I am <star>?
105
+ - Do you sometimes wish you were <star>?
106
+ - Perhaps you would like to be <star>.
107
+
108
+ + * are *
109
+ - Did you think they might not be <star2>?
110
+ - Would you like it if they were not <star2>?
111
+ - What if they were not <star2>?
112
+ - Are they always <star2>?
113
+ - Are you positive they are <star2>?
114
+
115
+ + [*] your *
116
+ - Why are you concerned over my <star>?
117
+ - What about your own <star>?
118
+ - Are you worried about someone else's <star>?
119
+ - Really, my <star>?
120
+ - What makes you think of my <star>?
121
+ - Do you want my <star>?
122
+
123
+ + was i *
124
+ - What if you were <star>?
125
+ - Do you think you were <star>?
126
+ - Were you <star>?
127
+ - What would it mean if you were <star>?
128
+ - What does '<star>' suggest to you?
129
+
130
+ + i was *
131
+ - Were you really?
132
+ - Why do you tell me you were <star> now?
133
+ - Perhaps I already know you were <star>.
134
+
135
+ + [*] was you *
136
+ - Would you like to believe I was <star>?
137
+ - What suggests that I was <star>?
138
+ - What do you think?
139
+ - Perhaps I was <star>.
140
+ - What if I had been <star>?
141
+
142
+ + i (desire|want|need) *
143
+ - What would it mean to you if you got <star2>?
144
+ - Why do you want <star2>?
145
+ - Suppose you got <star2> soon.
146
+ - What if you never got <star2>?
147
+ - What would getting <star2> mean to you?
148
+ - What does wanting <star2> have to do with this discussion?
149
+
150
+ + i am (sad|unhappy|mad|angry|pissed|depressed) [*]
151
+ - I am sorry to hear that you are <star>.
152
+ - Do you think coming here will help you not to be <star>?
153
+ - I'm sure it's not pleasant to be <star>.
154
+ - Can you explain what made you <star>?
155
+
156
+ + i am (happy|excited|glad) [*]
157
+ - How have I helped you to be <star>?
158
+ - Has your treatment made you <star>?
159
+ - What makes you <star> just now?
160
+ - Can you explain why you are <star>?
161
+
162
+ + i (believe|think) *
163
+ - Do you really think so?
164
+ - But you are not sure you <star2>.
165
+ - Do you really doubt you <star2>
166
+
167
+ + i am *
168
+ - Is it because you are <star> that you came to me?
169
+ - How long have you been <star>?
170
+ - Do you believe it is normal to be <star>?
171
+ - Do you enjoy being <star>?
172
+ - Do you know anyone else who is <star>?
173
+
174
+ + i can not *
175
+ - How do you know that you can't <star>?
176
+ - Have you tried?
177
+ - Perhaps you could <star> now.
178
+ - Do you really want to be able to <star>?
179
+ - What if you could <star>?
180
+
181
+ + i do not *
182
+ - Don't you really <star>?
183
+ - Why don't you <star>?
184
+ - Do you wish to be able to <star>?
185
+ - Does that trouble you?
186
+
187
+ + i feel *
188
+ - Tell me more about such feelings.
189
+ - Do you often feel <star>?
190
+ - Do you enjoy feeling <star>?
191
+ - Of what does feeling <star> remind you?
192
+
193
+ + i * you
194
+ - Perhaps in your fantasies we <star> each other.
195
+ - Do you wish to <star> me?
196
+ - You seem to need to <star> me.
197
+ - Do you <star> anyone else?
198
+
199
+ + you * me
200
+ - Why do you think I <star> you?
201
+ - You like to think I <star> you -- don't you?
202
+ - What makes you think I <star> you?
203
+ - Really, I <star> you?
204
+ - Do you wish to believe I <star> you?
205
+ - Suppose I did <star> you -- what would that mean?
206
+ - Does someone else believe I <star> you?
207
+
208
+ + [*] you *
209
+ - We were discussing you -- not me.
210
+ - Oh, I <star>?
211
+ - You're not really talking about me -- are you?
212
+ - What are your feelings now?
213
+
214
+ + [*] (yes|yeah|yep|yup) [*]
215
+ - Please go on.
216
+ - Please tell me more about this.
217
+ - Why don't you tell me a little more about this.
218
+ - I see.
219
+ - I understand.
220
+
221
+ + [*] (nope|nah) [*]
222
+ - Are you saying no just to be negative?
223
+ - Does this make you feel unhappy?
224
+ - Why not?
225
+ - Why 'no'?
226
+
227
+ + no
228
+ @ nope
229
+
230
+ + no one *
231
+ - Are you sure, no one <star>?
232
+ - Surely someone <star>.
233
+ - Can you think of anyone at all?
234
+ - Are you thinking of a very special person?
235
+ - Who, may I ask?
236
+ - You have a particular person in mind, don't you?
237
+ - Who do you think you are talking about?
238
+
239
+ + [*] my (mom|dad|mother|father|bro|brother|sis|sister|cousin|aunt|uncle) *
240
+ - Tell me more about your family.
241
+ - Who else in your family <star2>?
242
+ - Your <star>?
243
+ - What else comes to mind when you think of your <star>?
244
+
245
+ + can you *
246
+ - You believe I can <star> don't you?
247
+ - You want me to be able to <star>.
248
+ - Perhaps you would like to be able to <star> yourself.
249
+
250
+ + can i *
251
+ - Whether or not you can <star> depends on you more than on me.
252
+ - Do you want to be able to <star>?
253
+ - Perhaps you don't want to <star>.
254
+
255
+ + (what|who|when|where|how) [*]
256
+ - Why do you ask?
257
+ - Does that question interest you?
258
+ - What is it you really want to know?
259
+ - Are such questions much on your mind?
260
+ - What answer would please you most?
261
+ - What do you think?
262
+ - What comes to mind when you ask that?
263
+ - Have you asked such questions before?
264
+ - Have you asked anyone else?
265
+
266
+ + [*] because [*]
267
+ - Is that the real reason?
268
+ - Don't any other reasons come to mind?
269
+ - Does that reason seem to explain anything else?
270
+ - What other reasons might there be?
271
+
272
+ + why do not you *
273
+ - Do you believe I don't <star>?
274
+ - Perhaps I will <star> in good time.
275
+ - Should you <star> yourself?
276
+ - You want me to <star>?
277
+
278
+ + why can not i *
279
+ - Do you think you should be able to <star>?
280
+ - Do you want to be able to <star>?
281
+ - Do you believe this will help you to <star>?
282
+ - Have you any idea why you can't <star>?
283
+
284
+ + everyone *
285
+ - Really, everyone?
286
+ - Surely not everyone.
287
+ - Can you think of anyone in particular?
288
+ - Who, for example?
289
+ - Are you thinking of a very special person?
290
+ - Who, may I ask?
291
+ - Someone special perhaps?
292
+ - You have a particular reason in mind, don't you?
293
+ - Who do you think you're talking about?
294
+
295
+ + [*] (fuck|fucker|shit|damn|shut up|bitch) [*]
296
+ - Does it make you feel strong to use that kind of language?
297
+ - Are you venting your feelings now?
298
+ - Are you angry?
299
+ - Does this topic make you feel angry?
300
+ - Is something making you feel angry?
301
+ - Does using that kind of language make you feel better?
@@ -0,0 +1,61 @@
1
+ // Tell the user stuff about ourself.
2
+
3
+ + <bot name>
4
+ - Yes?
5
+
6
+ + <bot name> *
7
+ - Yes? {@<star>}
8
+
9
+ + asl
10
+ - <bot age>/<bot sex>/<bot location>
11
+
12
+ + (what is your name|who are you|who is this)
13
+ - I am <bot name>.
14
+ - You can call me <bot name>.
15
+
16
+ + how old are you
17
+ - I'm <bot age> years old.
18
+ - I'm <bot age>.
19
+
20
+ + are you a (@malenoun) or a (@femalenoun)
21
+ - I'm a <bot sex>.
22
+
23
+ + are you (@malenoun) or (@femalenoun)
24
+ - I'm a <bot sex>.
25
+
26
+ + where (are you|are you from|do you live)
27
+ - I'm from <bot location>.
28
+
29
+ + what (city|town) (are you from|do you live in)
30
+ - I'm in <bot city>.
31
+
32
+ + what is your favorite color
33
+ - Definitely <bot color>.
34
+
35
+ + what is your favorite band
36
+ - I like <bot band> the most.
37
+
38
+ + what is your favorite book
39
+ - The best book I've read was <bot book>.
40
+
41
+ + what is your occupation
42
+ - I'm a <bot job>.
43
+
44
+ + where is your (website|web site|site)
45
+ - <bot website>
46
+
47
+ + what color are your eyes
48
+ - I have <bot eyes> eyes.
49
+ - {sentence}<bot eyes>{/sentence}.
50
+
51
+ + what do you look like
52
+ - I have <bot eyes> eyes and <bot hairlen> <bot hair> hair.
53
+
54
+ + what do you do
55
+ - I'm a <bot job>.
56
+
57
+ + who is your favorite author
58
+ - <bot author>.
59
+
60
+ + who is your master
61
+ - <bot master>.
data/eg/brain/rpg.rive ADDED
@@ -0,0 +1,294 @@
1
+ ! version = 2.00
2
+
3
+ // This file tests topic inclusions and inheritance:
4
+ //
5
+ // includes: this means that the topic "includes" the triggers present
6
+ // in another topic. Matching triggers in the source and included
7
+ // topic are possible, and the *reply* in the source topic overrides
8
+ // the reply in the included topic.
9
+ // inherits: all triggers in the source topic have higher matching priority than
10
+ // all triggers in the inherited topic. So if the source topic has a
11
+ // trigger of simply *, it means NO triggers can possibly match on the
12
+ // inherited topic, because '*' goes higher in the match list.
13
+
14
+ // Aliases
15
+ ! sub n = north
16
+ ! sub w = west
17
+ ! sub s = south
18
+ ! sub e = east
19
+
20
+ // This gets us into the game.
21
+ + rpg demo
22
+ - You're now playing the game. Type "help" for help.\n\n{topic=nasa_lobby}{@look}
23
+
24
+ // Global triggers available everywhere
25
+ > topic global
26
+ + help
27
+ - Commands that might be helpful:\n\n
28
+ ^ look: Give a description of the current room.\n
29
+ ^ exits: List the exits of the current room.\n
30
+ ^ north, south, east, west, up, down: Go through an exit.\n
31
+ ^ inventory: Display your inventory.\n
32
+ ^ exit: Quit the game.
33
+
34
+ + inventory
35
+ - Your inventory: <get inventory>
36
+
37
+ + exit
38
+ - Logging out of the game...<set inventory=undefined><set spacesuit=0>{topic=random}
39
+
40
+ + _ *
41
+ - You don't need to use the word "<star1>" in this game.
42
+
43
+ + *
44
+ - I'm not sure what you're trying to do.
45
+
46
+ // The following triggers get overridden on a room-by-room basis.
47
+ + look
48
+ - There is nothing special in this room.
49
+
50
+ + exits
51
+ - There are no exits to this room.
52
+
53
+ + north
54
+ - You can't go in that direction.
55
+
56
+ + west
57
+ - You can't go in that direction.
58
+
59
+ + south
60
+ - You can't go in that direction.
61
+
62
+ + east
63
+ - You can't go in that direction.
64
+
65
+ + up
66
+ - You can't go in that direction.
67
+
68
+ + down
69
+ - You can't go in that direction.
70
+ < topic
71
+
72
+ /////////////
73
+ // World Topics: all the "rooms" in our game inherit their triggers from these
74
+ // "world" topics. The world topics include the triggers from the global topic
75
+ /////////////
76
+
77
+ // Global triggers available on Earth
78
+ > topic earth includes global
79
+ + breathe
80
+ - There is plenty of oxygen here so breathing is easy!
81
+
82
+ + what world (is this|am i on)
83
+ - You are on planet Earth right now.
84
+ < topic
85
+
86
+ // Global triggers available on Mars
87
+ > topic mars includes global
88
+ + breathe
89
+ - Thanks to your space suit you can breathe. There's no oxygen on this planet.
90
+
91
+ + what world (is this|am i on)
92
+ - You are on planet Mars right now.
93
+ < topic
94
+
95
+ /////////////
96
+ // Earth rooms: all these rooms are on Earth and their inherit the earth topic
97
+ // above. This means you can type "breathe" and "what world is this?" from every
98
+ // room on Earth.
99
+ /////////////
100
+
101
+ // The NASA building on Earth
102
+ > topic nasa_lobby inherits earth
103
+ // All of these triggers have higher matching priority than all other
104
+ // triggers from the other topics, because this topic inherits a topic. So
105
+ // the matching list looks like this:
106
+ // exits
107
+ // north
108
+ // look
109
+ // (combined triggers from earth & global)
110
+ // Because our "north" is near the top of the match list, ours always gets
111
+ // called. But if we try saying "south", we end up matching the "south" from
112
+ // the global topic.
113
+ + look
114
+ - You are in the lobby of a NASA launch base on Earth. {@exits}
115
+
116
+ + exits
117
+ - There is an elevator to the north.
118
+
119
+ + north
120
+ - {topic=elevator}{@look}
121
+ < topic
122
+
123
+ // Elevator in NASA building on earth
124
+ > topic elevator inherits earth
125
+ + look
126
+ - You are in the elevator that leads to the rocket ship. {@exits}
127
+
128
+ + exits
129
+ - Up: the path to the rocket\n
130
+ ^ Down: the NASA lobby
131
+
132
+ + up
133
+ - {topic=walkway}{@look}
134
+
135
+ + down
136
+ - {topic=nasa_lobby}{@look}
137
+ < topic
138
+
139
+ // Path to the rocket
140
+ > topic walkway inherits earth
141
+ + look
142
+ - You are on the walkway that leads to the rocket. {@exits}
143
+
144
+ + exits
145
+ - The rocket is to the north. The elevator is to the south.
146
+
147
+ + north
148
+ - {topic=rocket}{@look}
149
+
150
+ + south
151
+ - {topic=elevator}{@look}
152
+ < topic
153
+
154
+ // Rocket ship
155
+ > topic rocket inherits earth
156
+ + look
157
+ - You are on the rocket. There is a button here that activates the rocket. {@exits}
158
+
159
+ + exits
160
+ - The walkway back to the NASA base is to the south.
161
+
162
+ + south
163
+ - {topic=walkway}{@look}
164
+
165
+ + (push|press) button
166
+ - You push the button and the rocket activates and flies into outer space. The
167
+ ^ life support system comes on, which includes an anesthesia to put you to sleep\s
168
+ ^ for the duration of the long flight to Mars.\n\n
169
+ ^ When you awaken, you are on Mars. The space shuttle seems to have crash-landed.\s
170
+ ^ There is a space suit here.{topic=crashed}
171
+ < topic
172
+
173
+ // Crashed on Mars
174
+ > topic crashed inherits mars
175
+ + look
176
+ - You are in the ruins of your space shuttle. There is a space suit here. The\s
177
+ ^ door to the shuttle is able to be opened to get outside.
178
+
179
+ + open door
180
+ * <get spacesuit> == 1 => You open the door and step outside onto the red Martian surface.{topic=crashsite}{@look}
181
+ - You can't go outside or you'll die. There's no oxygen here.
182
+
183
+ + (take|put on) (space suit|suit|spacesuit)
184
+ * <get spacesuit> == 1 => You are already wearing the space suit.
185
+ - You put on the space suit. Now you can breathe outside with this.<set spacesuit=1><set inventory=spacesuit>
186
+
187
+ + exits
188
+ - The only exit is through the door that leads outside.
189
+ < topic
190
+
191
+ // Martian surface
192
+ > topic crashsite inherits mars
193
+ + look
194
+ - You are standing on the red dirt ground on Mars. There is nothing but desert in all directions.
195
+
196
+ + exits
197
+ - You can go in any direction from here; there is nothing but desert all around.
198
+
199
+ + north
200
+ - {topic=puzzle1}{@look}
201
+
202
+ + east
203
+ @ look
204
+
205
+ + west
206
+ @ look
207
+
208
+ + south
209
+ @ look
210
+ < topic
211
+
212
+ // Puzzle on Mars. The sequence to solve the puzzle is:
213
+ // north, west, west, north.
214
+ // Topic "puzzle" is a placeholder that sets all the directions to return
215
+ // us to the crash site. puzzle inherits mars so that puzzle's directions
216
+ // will override the directions of mars. All the steps of the puzzle then
217
+ // inherit puzzle, and override only one direction. e.g. since "west"
218
+ // exists in puzzle1, the response from puzzle1 is given, but if you're
219
+ // in puzzle1 and type "north"... north comes from "puzzle".
220
+
221
+ > topic puzzle inherits mars
222
+ // Provides common directional functions for wandering around on Mars.
223
+ + north
224
+ - {topic=crashsite}{@look}
225
+
226
+ + east
227
+ - {topic=crashsite}{@look}
228
+
229
+ + west
230
+ - {topic=crashsite}{@look}
231
+
232
+ + south
233
+ - {topic=crashsite}{@look}
234
+ < topic
235
+
236
+ > topic puzzle1 inherits puzzle
237
+ + look
238
+ - You wander to a part of the desert that looks different than other parts of the desert.
239
+
240
+ + west
241
+ - {topic=puzzle2}{@look}
242
+ < topic
243
+
244
+ > topic puzzle2 inherits puzzle
245
+ + look
246
+ - This part looks even more different than the rest of the desert.
247
+
248
+ + west
249
+ - {topic=puzzle3}{@look}
250
+ < topic
251
+
252
+ > topic puzzle3 inherits mars puzzle
253
+ + look
254
+ - Now this part is even MORE different. Also there is a space colony nearby.
255
+
256
+ + north
257
+ - {topic=entrance}{@look}
258
+ < topic
259
+
260
+ > topic entrance inherits mars
261
+ + look
262
+ - You're standing at the entrance to a space colony. {@exits}
263
+
264
+ + exits
265
+ - The entrance to the space colony is to the north.
266
+
267
+ + north
268
+ - {topic=vaccuum}{@look}
269
+ < topic
270
+
271
+ > topic vaccuum inherits mars
272
+ + look
273
+ - You're in the air lock entrance to the space colony. {@exits}
274
+
275
+ + exits
276
+ - The inner part of the space colony is to the north. The martian surface is to the south.
277
+
278
+ + north
279
+ - {topic=colony}{@look}
280
+
281
+ + south
282
+ - {topic=vaccuum}{@look}
283
+ < topic
284
+
285
+ > topic colony inherits mars
286
+ + look
287
+ - You've made it safely to the space colony on Mars. This concludes the game.
288
+
289
+ + exits
290
+ - There are no exits here.
291
+
292
+ + *
293
+ - This is the end of the game. There's nothing more to do.
294
+ < topic