mockup #7

Merged
s444519 merged 19 commits from mockup into master 2022-05-04 12:47:45 +02:00
5 changed files with 61 additions and 0 deletions
Showing only changes of commit 43611746b5 - Show all commits

10
src/components/DP.py Normal file
View File

@ -0,0 +1,10 @@
# Martyna
class DP:
def __self__():
pass
def getAct(slots):
# iterate over slots
# find empty
# returns system act
pass

10
src/components/DST.py Normal file
View File

@ -0,0 +1,10 @@
# Adrian
class DST:
def __self__():
pass
def getDialogueState(userActs):
# iterate over speech acts
# fill slots
# returns all slots
pass

9
src/components/NLG.py Normal file
View File

@ -0,0 +1,9 @@
# Mikolaj
class NLG:
def __self__():
pass
def getResponse(systemAct):
# check speech act
# generate response
pass

26
src/components/NLU.py Normal file
View File

@ -0,0 +1,26 @@
# Iwona
class NLU:
# add slots
userSpeechActs = {
'hello': None,
'null': None,
'inform': None,
'ack': None,
}
def getUserActs(self, userInput):
resultUserActs = []
# split user input
userInput = userInput.lower().split()
# find key words
if "cześć" in userInput:
resultUserActs.append(self.userSpeechActs[0])
if "imię" in userInput:
resultUserActs.append(self.userSpeechActs[0])
# returns user speech act
return

6
src/dialogue_system.py Normal file
View File

@ -0,0 +1,6 @@
def generate_response(input):
result = "pass"
return result
inputText = 'Cześć, jak masz na imię?'
print(generate_response(inputText))