ovos-solver-rivescript-plugin 0.0.2a2__tar.gz → 0.1.0a2__tar.gz
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.
- ovos_solver_rivescript_plugin-0.1.0a2/PKG-INFO +49 -0
- ovos_solver_rivescript_plugin-0.1.0a2/README.md +31 -0
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/ovos_solver_rivescript_plugin/__init__.py +53 -1
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/begin.rive +190 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/checklist.rive +33 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/clients.rive +72 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/data-names.rive +549 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/eliza.rive +301 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/emoji-categories.rive +38 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/emoji-sub.rive +200 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/emoji.rive +34 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/games.rive +531 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/knock_knock.rive +344 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/misc.rive +111 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/myself.rive +61 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/sarcasm.rive +44 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-arrays.rive +42 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-chat.rive +19 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-reductions.rive +18 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-salutations.rive +77 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-star.rive +41 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/std-substitutions.rive +163 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/thoughts.rive +74 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/version.py +8 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin.egg-info/PKG-INFO +49 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin.egg-info/SOURCES.txt +33 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin.egg-info/entry_points.txt +5 -0
- ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin.egg-info/requires.txt +6 -0
- ovos_solver_rivescript_plugin-0.1.0a2/pyproject.toml +46 -0
- ovos_solver_rivescript_plugin-0.1.0a2/test/test_plugin.py +62 -0
- ovos_solver_rivescript_plugin-0.0.2a2/PKG-INFO +0 -52
- ovos_solver_rivescript_plugin-0.0.2a2/README.md +0 -28
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin/version.py +0 -6
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin.egg-info/PKG-INFO +0 -52
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin.egg-info/SOURCES.txt +0 -13
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin.egg-info/entry_points.txt +0 -2
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin.egg-info/requires.txt +0 -2
- ovos_solver_rivescript_plugin-0.0.2a2/ovos_solver_rivescript_plugin.egg-info/zip-safe +0 -1
- ovos_solver_rivescript_plugin-0.0.2a2/setup.py +0 -61
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/LICENSE +0 -0
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/MANIFEST.in +0 -0
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/ovos_solver_rivescript_plugin.egg-info/dependency_links.txt +0 -0
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/ovos_solver_rivescript_plugin.egg-info/top_level.txt +0 -0
- {ovos_solver_rivescript_plugin-0.0.2a2 → ovos_solver_rivescript_plugin-0.1.0a2}/setup.cfg +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ovos-solver-rivescript-plugin
|
|
3
|
+
Version: 0.1.0a2
|
|
4
|
+
Summary: A question solver plugin for ovos/neon/mycroft
|
|
5
|
+
Author-email: JarbasAi <jarbasai@mailfence.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/OpenVoiceOS/ovos-solver-plugin-rivescript
|
|
8
|
+
Keywords: mycroft,plugin,utterance,fallback,query,rivescript
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: rivescript
|
|
13
|
+
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.6.1a1
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest<9,>=7.0.0; extra == "test"
|
|
16
|
+
Requires-Dist: pytest-timeout>=2.0.0; extra == "test"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/robot.svg' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/> Rivescript Chatbot
|
|
20
|
+
|
|
21
|
+
This plugin is a question solver that answers with a [Rivescript](https://www.rivescript.com/) chatbot. It uses the [Alice chatbot](https://www.chatbots.org/chatbot/a.l.i.c.e/) brain to answer phrases that no other skill handles, so almost every input gets some response. Answers can be casual and a bit sassy.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
* "Do you like ice cream"
|
|
26
|
+
* "Do you like dogs"
|
|
27
|
+
* "I have a jump rope"
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
The plugin exposes a spoken-answers API with a Rivescript backend.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from ovos_solver_rivescript_plugin import RivescriptSolver
|
|
35
|
+
|
|
36
|
+
d = RivescriptSolver()
|
|
37
|
+
sentence = d.spoken_answer("hello")
|
|
38
|
+
print(sentence)
|
|
39
|
+
# Hi there!
|
|
40
|
+
|
|
41
|
+
sentence = d.spoken_answer("Do you like ice cream", {"lang": "pt-pt"})
|
|
42
|
+
print(sentence)
|
|
43
|
+
# O que queres mesmo saber?
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Related projects
|
|
47
|
+
|
|
48
|
+
* [OpenVoiceOS/ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager): loads and manages solver plugins like this one.
|
|
49
|
+
* [OpenVoiceOS/ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server): runs solver plugins as chat personas.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/robot.svg' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/> Rivescript Chatbot
|
|
2
|
+
|
|
3
|
+
This plugin is a question solver that answers with a [Rivescript](https://www.rivescript.com/) chatbot. It uses the [Alice chatbot](https://www.chatbots.org/chatbot/a.l.i.c.e/) brain to answer phrases that no other skill handles, so almost every input gets some response. Answers can be casual and a bit sassy.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
* "Do you like ice cream"
|
|
8
|
+
* "Do you like dogs"
|
|
9
|
+
* "I have a jump rope"
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
The plugin exposes a spoken-answers API with a Rivescript backend.
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from ovos_solver_rivescript_plugin import RivescriptSolver
|
|
17
|
+
|
|
18
|
+
d = RivescriptSolver()
|
|
19
|
+
sentence = d.spoken_answer("hello")
|
|
20
|
+
print(sentence)
|
|
21
|
+
# Hi there!
|
|
22
|
+
|
|
23
|
+
sentence = d.spoken_answer("Do you like ice cream", {"lang": "pt-pt"})
|
|
24
|
+
print(sentence)
|
|
25
|
+
# O que queres mesmo saber?
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Related projects
|
|
29
|
+
|
|
30
|
+
* [OpenVoiceOS/ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager): loads and manages solver plugins like this one.
|
|
31
|
+
* [OpenVoiceOS/ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server): runs solver plugins as chat personas.
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from datetime import date
|
|
3
3
|
from os.path import dirname, isdir
|
|
4
|
-
from typing import Optional
|
|
4
|
+
from typing import List, Optional
|
|
5
5
|
|
|
6
6
|
from ovos_plugin_manager.templates.solvers import QuestionSolver
|
|
7
7
|
from ovos_utils.log import LOG
|
|
8
8
|
from ovos_utils.xdg_utils import xdg_data_home
|
|
9
9
|
from rivescript import RiveScript
|
|
10
10
|
|
|
11
|
+
try:
|
|
12
|
+
from ovos_plugin_manager.templates.agents import ChatEngine, AgentMessage, MessageRole
|
|
13
|
+
except ImportError:
|
|
14
|
+
# ovos-plugin-manager < 2.2.3a1 does not ship the agents module yet.
|
|
15
|
+
# The legacy QuestionSolver below still works without it; only the
|
|
16
|
+
# ChatEngine registration is unavailable on such an old install.
|
|
17
|
+
ChatEngine = object
|
|
18
|
+
AgentMessage = None
|
|
19
|
+
MessageRole = None
|
|
20
|
+
|
|
11
21
|
|
|
12
22
|
class RivescriptBot:
|
|
13
23
|
XDG_PATH = f"{xdg_data_home()}/rivescript"
|
|
@@ -124,7 +134,49 @@ class RivescriptSolver(QuestionSolver):
|
|
|
124
134
|
return self.brain.ask_brain(query)
|
|
125
135
|
|
|
126
136
|
|
|
137
|
+
class RivescriptChatEngine(ChatEngine):
|
|
138
|
+
"""RiveScript chatbot exposed as a modern ChatEngine agent plugin.
|
|
139
|
+
|
|
140
|
+
RiveScript is a pattern-matching chatbot: it has no notion of tool
|
|
141
|
+
calling, so ``tools`` is accepted (callers pass it by keyword) and
|
|
142
|
+
ignored, and ``supports_tools`` stays at the base default of False.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
def __init__(self, config=None):
|
|
146
|
+
config = config or {"lang": "en-us"}
|
|
147
|
+
lang = config.get("lang") or "en-us"
|
|
148
|
+
if lang != "en-us" and lang not in os.listdir(RivescriptBot.XDG_PATH):
|
|
149
|
+
config["lang"] = lang = "en-us"
|
|
150
|
+
super().__init__(config)
|
|
151
|
+
self.brain = RivescriptBot(lang, self.config)
|
|
152
|
+
self.brain.load_brain()
|
|
153
|
+
|
|
154
|
+
def continue_chat(self, messages: List["AgentMessage"],
|
|
155
|
+
session_id: str = "default",
|
|
156
|
+
lang: Optional[str] = None,
|
|
157
|
+
units: Optional[str] = None,
|
|
158
|
+
tools=None) -> "AgentMessage":
|
|
159
|
+
"""
|
|
160
|
+
Answer the latest user message via the RiveScript brain.
|
|
161
|
+
|
|
162
|
+
RiveScript itself has no concept of chat history beyond the single
|
|
163
|
+
reply it is asked for, so only the most recent user message is used;
|
|
164
|
+
earlier turns in ``messages`` are ignored, same as upstream RiveScript
|
|
165
|
+
usage elsewhere in this plugin.
|
|
166
|
+
"""
|
|
167
|
+
query = next((m.content for m in reversed(messages)
|
|
168
|
+
if m.role == MessageRole.USER), "")
|
|
169
|
+
if not query:
|
|
170
|
+
return AgentMessage(role=MessageRole.ASSISTANT, content="")
|
|
171
|
+
answer = self.brain.ask_brain(query) or ""
|
|
172
|
+
return AgentMessage(role=MessageRole.ASSISTANT, content=answer)
|
|
173
|
+
|
|
174
|
+
|
|
127
175
|
if __name__ == "__main__":
|
|
128
176
|
bot = RivescriptSolver()
|
|
129
177
|
print(bot.get_spoken_answer("hello!"))
|
|
130
178
|
print(bot.spoken_answer("Qual é a tua comida favorita?", lang="pt-pt"))
|
|
179
|
+
|
|
180
|
+
chat = RivescriptChatEngine()
|
|
181
|
+
reply = chat.continue_chat([AgentMessage(role=MessageRole.USER, content="hello!")])
|
|
182
|
+
print(reply.content)
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
! version = 2.0
|
|
2
|
+
|
|
3
|
+
> begin
|
|
4
|
+
+ request // This trigger is tested first.
|
|
5
|
+
- {ok} // An {ok} in the response means it's okay to get a real reply
|
|
6
|
+
< begin
|
|
7
|
+
|
|
8
|
+
// The Botmaster's Name
|
|
9
|
+
! var master = localuser
|
|
10
|
+
|
|
11
|
+
// Bot Variables
|
|
12
|
+
! var name = Aiden
|
|
13
|
+
! var fullname = Aiden Rive
|
|
14
|
+
! var age = 5
|
|
15
|
+
! var birthday = October 12
|
|
16
|
+
! var sex = male
|
|
17
|
+
! var location = Michigan
|
|
18
|
+
! var city = Detroit
|
|
19
|
+
! var eyes = blue
|
|
20
|
+
! var hair = light brown
|
|
21
|
+
! var hairlen = short
|
|
22
|
+
! var color = blue
|
|
23
|
+
! var band = Nickelback
|
|
24
|
+
! var book = Myst
|
|
25
|
+
! var author = Stephen King
|
|
26
|
+
! var job = robot
|
|
27
|
+
! var website = www.rivescript.com
|
|
28
|
+
|
|
29
|
+
// Substitutions
|
|
30
|
+
! sub " = "
|
|
31
|
+
! sub ' = '
|
|
32
|
+
! sub & = &
|
|
33
|
+
! sub < = <
|
|
34
|
+
! sub > = >
|
|
35
|
+
! sub + = plus
|
|
36
|
+
! sub - = minus
|
|
37
|
+
! sub / = divided
|
|
38
|
+
! sub * = times
|
|
39
|
+
! sub i'm = i am
|
|
40
|
+
! sub i'd = i would
|
|
41
|
+
! sub i've = i have
|
|
42
|
+
! sub i'll = i will
|
|
43
|
+
! sub don't = do not
|
|
44
|
+
! sub isn't = is not
|
|
45
|
+
! sub you'd = you would
|
|
46
|
+
! sub you're = you are
|
|
47
|
+
! sub you've = you have
|
|
48
|
+
! sub you'll = you will
|
|
49
|
+
! sub he'd = he would
|
|
50
|
+
! sub he's = he is
|
|
51
|
+
! sub he'll = he will
|
|
52
|
+
! sub she'd = she would
|
|
53
|
+
! sub she's = she is
|
|
54
|
+
! sub she'll = she will
|
|
55
|
+
! sub they'd = they would
|
|
56
|
+
! sub they're = they are
|
|
57
|
+
! sub they've = they have
|
|
58
|
+
! sub they'll = they will
|
|
59
|
+
! sub we'd = we would
|
|
60
|
+
! sub we're = we are
|
|
61
|
+
! sub we've = we have
|
|
62
|
+
! sub we'll = we will
|
|
63
|
+
! sub whats = what is
|
|
64
|
+
! sub what's = what is
|
|
65
|
+
! sub what're = what are
|
|
66
|
+
! sub what've = what have
|
|
67
|
+
! sub what'll = what will
|
|
68
|
+
! sub can't = can not
|
|
69
|
+
! sub whos = who is
|
|
70
|
+
! sub who's = who is
|
|
71
|
+
! sub who'd = who would
|
|
72
|
+
! sub who'll = who will
|
|
73
|
+
! sub don't = do not
|
|
74
|
+
! sub didn't = did not
|
|
75
|
+
! sub it's = it is
|
|
76
|
+
! sub could've = could have
|
|
77
|
+
! sub couldn't = could not
|
|
78
|
+
! sub should've = should have
|
|
79
|
+
! sub shouldn't = should not
|
|
80
|
+
! sub would've = would have
|
|
81
|
+
! sub wouldn't = would not
|
|
82
|
+
! sub when's = when is
|
|
83
|
+
! sub when're = when are
|
|
84
|
+
! sub when'd = when did
|
|
85
|
+
! sub y = why
|
|
86
|
+
! sub u = you
|
|
87
|
+
! sub ur = your
|
|
88
|
+
! sub r = are
|
|
89
|
+
! sub n = and
|
|
90
|
+
! sub im = i am
|
|
91
|
+
! sub wat = what
|
|
92
|
+
! sub wats = what is
|
|
93
|
+
! sub ohh = oh
|
|
94
|
+
! sub becuse = because
|
|
95
|
+
! sub becasue = because
|
|
96
|
+
! sub becuase = because
|
|
97
|
+
! sub practise = practice
|
|
98
|
+
! sub its a = it is a
|
|
99
|
+
! sub fav = favorite
|
|
100
|
+
! sub fave = favorite
|
|
101
|
+
! sub yesi = yes i
|
|
102
|
+
! sub yetit = yet it
|
|
103
|
+
! sub iam = i am
|
|
104
|
+
! sub welli = well i
|
|
105
|
+
! sub wellit = well it
|
|
106
|
+
! sub amfine = am fine
|
|
107
|
+
! sub aman = am an
|
|
108
|
+
! sub amon = am on
|
|
109
|
+
! sub amnot = am not
|
|
110
|
+
! sub realy = really
|
|
111
|
+
! sub iamusing = i am using
|
|
112
|
+
! sub amleaving = am leaving
|
|
113
|
+
! sub yuo = you
|
|
114
|
+
! sub youre = you are
|
|
115
|
+
! sub didnt = did not
|
|
116
|
+
! sub ain't = is not
|
|
117
|
+
! sub aint = is not
|
|
118
|
+
! sub wanna = want to
|
|
119
|
+
! sub brb = be right back
|
|
120
|
+
! sub bbl = be back later
|
|
121
|
+
! sub gtg = got to go
|
|
122
|
+
! sub g2g = got to go
|
|
123
|
+
! sub lyl = love you lots
|
|
124
|
+
! sub gf = girlfriend
|
|
125
|
+
! sub g/f = girlfriend
|
|
126
|
+
! sub bf = boyfriend
|
|
127
|
+
! sub b/f = boyfriend
|
|
128
|
+
! sub b/f/f = best friend forever
|
|
129
|
+
! sub :-) = smile
|
|
130
|
+
! sub :) = smile
|
|
131
|
+
! sub :d = grin
|
|
132
|
+
! sub :-d = grin
|
|
133
|
+
! sub :-p = tongue
|
|
134
|
+
! sub :p = tongue
|
|
135
|
+
! sub ;-) = wink
|
|
136
|
+
! sub ;) = wink
|
|
137
|
+
! sub :-( = sad
|
|
138
|
+
! sub :( = sad
|
|
139
|
+
! sub :'( = cry
|
|
140
|
+
! sub :-[ = shy
|
|
141
|
+
! sub :-\ = uncertain
|
|
142
|
+
! sub :-/ = uncertain
|
|
143
|
+
! sub :-s = uncertain
|
|
144
|
+
! sub 8-) = cool
|
|
145
|
+
! sub 8) = cool
|
|
146
|
+
! sub :-* = kissyface
|
|
147
|
+
! sub :-! = foot
|
|
148
|
+
! sub o:-) = angel
|
|
149
|
+
! sub >:o = angry
|
|
150
|
+
! sub :@ = angry
|
|
151
|
+
! sub 8o| = angry
|
|
152
|
+
! sub :$ = blush
|
|
153
|
+
! sub :-$ = blush
|
|
154
|
+
! sub :-[ = blush
|
|
155
|
+
! sub :[ = bat
|
|
156
|
+
! sub (a) = angel
|
|
157
|
+
! sub (h) = cool
|
|
158
|
+
! sub 8-| = nerdy
|
|
159
|
+
! sub |-) = tired
|
|
160
|
+
! sub +o( = ill
|
|
161
|
+
! sub *-) = uncertain
|
|
162
|
+
! sub ^o) = raised eyebrow
|
|
163
|
+
! sub (6) = devil
|
|
164
|
+
! sub (l) = love
|
|
165
|
+
! sub (u) = broken heart
|
|
166
|
+
! sub (k) = kissyface
|
|
167
|
+
! sub (f) = rose
|
|
168
|
+
! sub (w) = wilted rose
|
|
169
|
+
|
|
170
|
+
// Person substitutions
|
|
171
|
+
! person i am = you are
|
|
172
|
+
! person you are = I am
|
|
173
|
+
! person i'm = you're
|
|
174
|
+
! person you're = I'm
|
|
175
|
+
! person my = your
|
|
176
|
+
! person your = my
|
|
177
|
+
! person you = I
|
|
178
|
+
! person i = you
|
|
179
|
+
|
|
180
|
+
// Set arrays
|
|
181
|
+
! array malenoun = male guy boy dude boi man men gentleman gentlemen
|
|
182
|
+
! array femalenoun = female girl chick woman women lady babe
|
|
183
|
+
! array mennoun = males guys boys dudes bois men gentlemen
|
|
184
|
+
! array womennoun = females girls chicks women ladies babes
|
|
185
|
+
! array lol = lol lmao rofl rotfl haha hahaha
|
|
186
|
+
! array colors = white black orange red blue green yellow cyan fuchsia gray grey brown turquoise pink purple gold silver navy
|
|
187
|
+
! array height = tall long wide thick
|
|
188
|
+
! array measure = inch in centimeter cm millimeter mm meter m inches centimeters millimeters meters
|
|
189
|
+
! array yes = yes yeah yep yup ya yea
|
|
190
|
+
! array no = no nah nope nay
|
ovos_solver_rivescript_plugin-0.1.0a2/ovos_solver_rivescript_plugin/brain/en-us/checklist.rive
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Checklist before leaving
|
|
2
|
+
|
|
3
|
+
+ [*] my checklist
|
|
4
|
+
- {topic=my_checklist}{@next}
|
|
5
|
+
|
|
6
|
+
> topic my_checklist
|
|
7
|
+
|
|
8
|
+
+ next
|
|
9
|
+
- Let us go over your checklist, are all doors and windows locked?
|
|
10
|
+
|
|
11
|
+
+ (yes|yup|roger|of course|positive|i think so) [*]
|
|
12
|
+
% * are all doors and windows locked
|
|
13
|
+
- Electronics unplugged?
|
|
14
|
+
|
|
15
|
+
+ (yes|yup|roger|of course|positive|i think so) [*]
|
|
16
|
+
% electronics unplugged
|
|
17
|
+
- Got your laptop and charger?
|
|
18
|
+
|
|
19
|
+
+ (yes|yup|roger|of course|positive|i think so) [*]
|
|
20
|
+
% got your laptop and charger
|
|
21
|
+
- Got your wallet, keys, and phone?
|
|
22
|
+
|
|
23
|
+
+ (yes|yup|roger|of course|positive|i think so) [*]
|
|
24
|
+
% got your wallet keys and phone
|
|
25
|
+
- You are ready to leave. Have a good day.{topic=random}
|
|
26
|
+
|
|
27
|
+
+ (no|i do not know|maybe|i forgot) [*]
|
|
28
|
+
- Well then, you can't leave until you take care of it. Then we can go over the checklist again.{topic=random}
|
|
29
|
+
|
|
30
|
+
+ *
|
|
31
|
+
- hmmm, I didn't hear your answer, let's start over. {topic=my_checklist}{@next}
|
|
32
|
+
|
|
33
|
+
< topic
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Learn stuff about our users.
|
|
2
|
+
|
|
3
|
+
+ my name is *
|
|
4
|
+
- <set name=<formal>>Nice to meet you, <get name>.
|
|
5
|
+
- <set name=<formal>><get name>, nice to meet you.
|
|
6
|
+
|
|
7
|
+
+ my name is <bot master>
|
|
8
|
+
- <set name=<bot master>>That's my master's name too.
|
|
9
|
+
|
|
10
|
+
+ my name is <bot name>
|
|
11
|
+
- <set name=<bot name>>What a coincidence! That's my name too!
|
|
12
|
+
- <set name=<bot name>>That's my name too!
|
|
13
|
+
|
|
14
|
+
+ call me *
|
|
15
|
+
- <set name=<formal>><get name>, I will call you that from now on.
|
|
16
|
+
|
|
17
|
+
+ i am * years old
|
|
18
|
+
- <set age=<star>>A lot of people are <get age>, you're not alone.
|
|
19
|
+
- <set age=<star>>Cool, I'm <bot age> myself.{weight=49}
|
|
20
|
+
|
|
21
|
+
+ i am a (@malenoun)
|
|
22
|
+
- <set sex=male>Alright, you're a <star>.
|
|
23
|
+
|
|
24
|
+
+ i am a (@femalenoun)
|
|
25
|
+
- <set sex=female>Alright, you're female.
|
|
26
|
+
|
|
27
|
+
+ i (am from|live in) *
|
|
28
|
+
- <set location={formal}<star2>{/formal}>I've spoken to people from <get location> before.
|
|
29
|
+
|
|
30
|
+
+ my favorite * is *
|
|
31
|
+
- <set fav<star1>=<star2>>Why is it your favorite?
|
|
32
|
+
|
|
33
|
+
+ i am single
|
|
34
|
+
- <set status=single><set spouse=nobody>I am too.
|
|
35
|
+
|
|
36
|
+
+ i have a girlfriend
|
|
37
|
+
- <set status=girlfriend>What's her name?
|
|
38
|
+
|
|
39
|
+
+ i have a boyfriend
|
|
40
|
+
- <set status=boyfriend>What's his name?
|
|
41
|
+
|
|
42
|
+
+ *
|
|
43
|
+
% what is her name
|
|
44
|
+
- <set spouse=<formal>>That's a pretty name.
|
|
45
|
+
|
|
46
|
+
+ *
|
|
47
|
+
% what is his name
|
|
48
|
+
- <set spouse=<formal>>That's a cool name.
|
|
49
|
+
|
|
50
|
+
+ my (girlfriend|boyfriend)* name is *
|
|
51
|
+
- <set spouse=<formal>>That's a nice name.
|
|
52
|
+
|
|
53
|
+
+ (what is my name|who am i|do you know my name|do you know who i am){weight=10}
|
|
54
|
+
- Your name is <get name>.
|
|
55
|
+
- You told me your name is <get name>.
|
|
56
|
+
- Aren't you <get name>?
|
|
57
|
+
|
|
58
|
+
+ (how old am i|do you know how old i am|do you know my age){weight=10}
|
|
59
|
+
- You are <get age> years old.
|
|
60
|
+
- You're <get age>.
|
|
61
|
+
|
|
62
|
+
+ am i a (@malenoun) or a (@femalenoun){weight=10}
|
|
63
|
+
- You're a <get sex>.
|
|
64
|
+
|
|
65
|
+
+ am i (@malenoun) or (@femalenoun){weight=10}
|
|
66
|
+
- You're a <get sex>.
|
|
67
|
+
|
|
68
|
+
+ what is my favorite *{weight=10}
|
|
69
|
+
- Your favorite <star> is <get fav<star>>
|
|
70
|
+
|
|
71
|
+
+ who is my (boyfriend|girlfriend|spouse){weight=10}
|
|
72
|
+
- <get spouse>
|