25 lines
638 B
Python
25 lines
638 B
Python
from NaturalLanguageAnalyzer import NaturalLanguageAnalyzer
|
|
from DialogueStateTracker import DialogueStateTracker
|
|
from DialoguePolicy import DialoguePolicy
|
|
from NaturalLanguageGeneration import NaturalLanguageGeneration
|
|
|
|
if __name__ == "__main__":
|
|
text = "Cześć, jak masz na imię?"
|
|
nla = NaturalLanguageAnalyzer()
|
|
user_act = nla.process(text)
|
|
print(user_act)
|
|
|
|
dst = DialogueStateTracker()
|
|
state = dst.dst(user_act)
|
|
print(state)
|
|
|
|
dp = DialoguePolicy()
|
|
system_act = dp.policy(state)
|
|
print(system_act)
|
|
|
|
nlg = NaturalLanguageGeneration()
|
|
response = nlg.nlg(system_act)
|
|
print(response)
|
|
|
|
|