convlab2.nlg package

Submodules

convlab2.nlg.evaluate module

Evaluate NLU models on specified dataset Metric: dataset level Precision/Recall/F1 Usage: python evaluate.py [MultiWOZ] [SCLSTM|TemplateNLG] [usr|sys]

convlab2.nlg.evaluate.get_bleu4(dialog_acts, golden_utts, gen_utts)

convlab2.nlg.nlg module

Natural Language Generation Interface

class convlab2.nlg.nlg.NLG

Bases: convlab2.util.module.Module

NLG module interface.

generate(action)

Generate a natural language utterance conditioned on the dialog act.

Args:
action (list of list):

The dialog action produced by dialog policy module, which is in dialog act format.

Returns:
utterance (str):

A natural langauge utterance.

Module contents