Change to TemplateNLG
This commit is contained in:
parent
99306f0532
commit
893733025b
@ -42,5 +42,5 @@ class MachineLearningNLG:
|
||||
# Przykład użycia
|
||||
if __name__ == "__main__":
|
||||
nlg = MachineLearningNLG()
|
||||
system_act = "inform(people.kids.ages=[4,9])"
|
||||
system_act = "inform(hotel='Four Seasons Hotel')"
|
||||
print(nlg.nlg(system_act))
|
||||
|
3
Main.py
3
Main.py
@ -3,13 +3,14 @@ from DialoguePolicy import DialoguePolicy
|
||||
from DialogueStateTracker import DialogueStateTracker
|
||||
from convlab.dialog_agent import PipelineAgent
|
||||
from MachineLearningNLG import MachineLearningNLG # Importujemy nowy komponent NLG
|
||||
from convlab.nlg.template.multiwoz import TemplateNLG
|
||||
|
||||
if __name__ == "__main__":
|
||||
text = "chciałbym zarezerwować drogi hotel z parkingiem 1 stycznia w Warszawie w centrum"
|
||||
nlu = NaturalLanguageAnalyzer()
|
||||
dst = DialogueStateTracker()
|
||||
policy = DialoguePolicy()
|
||||
nlg = MachineLearningNLG()
|
||||
nlg = TemplateNLG(is_user=False)
|
||||
|
||||
agent = PipelineAgent(nlu=nlu, dst=dst, policy=policy, nlg=nlg, name='sys')
|
||||
response = agent.response(text)
|
||||
|
Loading…
Reference in New Issue
Block a user