Add dp and nlg
This commit is contained in:
parent
6700154e86
commit
6535d5d752
BIN
requirements-analysis.pdf
Normal file
BIN
requirements-analysis.pdf
Normal file
Binary file not shown.
@ -1,2 +1,5 @@
|
|||||||
class Dp:
|
class Dp:
|
||||||
pass
|
def __init__(self):
|
||||||
|
self.actions = {
|
||||||
|
"name": ['imie', 'imię']
|
||||||
|
}
|
@ -1,2 +1,20 @@
|
|||||||
|
from asyncio.constants import SENDFILE_FALLBACK_READBUFFER_SIZE
|
||||||
|
|
||||||
|
|
||||||
class Nlg:
|
class Nlg:
|
||||||
pass
|
def __init__(self):
|
||||||
|
|
||||||
|
|
||||||
|
self.reactions = {
|
||||||
|
"name": "Mam na imie Trailminator."
|
||||||
|
}
|
||||||
|
|
||||||
|
def detect_action(self, message):
|
||||||
|
for k, v in self.actions:
|
||||||
|
if any(m in v for m in message):
|
||||||
|
return k
|
||||||
|
|
||||||
|
def generate_action(self, action):
|
||||||
|
return self.reactions[action]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user