convlab2.nlg.template.camrest package¶
Submodules¶
convlab2.nlg.template.camrest.evaluate module¶
Evaluate NLG models on utterances of Multiwoz test dataset Metric: dataset level BLEU-4, slot error rate Usage: python evaluate.py [usr|sys|all]
-
convlab2.nlg.template.camrest.evaluate.
get_bleu4
(dialog_acts, golden_utts, gen_utts)¶
convlab2.nlg.template.camrest.nlg module¶
-
class
convlab2.nlg.template.camrest.nlg.
TemplateNLG
(is_user, mode='manual')¶ Bases:
convlab2.nlg.nlg.NLG
-
generate
(dialog_acts)¶ NLG for Multiwoz dataset
- Args:
- dialog_acts:
{da1:[[slot1,value1],…], da2:…}
- Returns:
generated sentence
-
static
read_json
(filename)¶
-
-
convlab2.nlg.template.camrest.nlg.
example
()¶
-
convlab2.nlg.template.camrest.nlg.
test
()¶