convlab2.nlg.template.crosswoz package

Submodules

convlab2.nlg.template.crosswoz.evaluate module

convlab2.nlg.template.crosswoz.evaluate.act2intent(dialog_act: list)
convlab2.nlg.template.crosswoz.evaluate.get_bleu4(dialog_acts, golden_utts, gen_utts, data_key)
convlab2.nlg.template.crosswoz.evaluate.split_delex_sentence(sen)
convlab2.nlg.template.crosswoz.evaluate.value_replace(sentences, dialog_act)

convlab2.nlg.template.crosswoz.generate_auto_template module

convlab2.nlg.template.crosswoz.generate_auto_template.main()
convlab2.nlg.template.crosswoz.generate_auto_template.read_zipped_json(filepath, filename)

convlab2.nlg.template.crosswoz.nlg module

class convlab2.nlg.template.crosswoz.nlg.TemplateNLG(is_user, mode='auto_manual')

Bases: convlab2.nlg.nlg.NLG

generate(dialog_act)
Parameters

dialog_act – [[“Request”, “景点”, “名称”, “”], [“Inform”, “景点”, “门票”, “免费”], …]

Returns

a sentence

convlab2.nlg.template.crosswoz.nlg.example()
convlab2.nlg.template.crosswoz.nlg.read_json(filename)
convlab2.nlg.template.crosswoz.nlg.read_zipped_json(filepath, filename)

Module contents