def __init__(self, act): # parsed is a dict of lists. 'slots' list contains dact items parsed = dact._InParseAct(act) self.act = parsed['act'] self.items = parsed['slots'] self.prompt = None
def __init__(self, act): if isinstance(act, DiaAct): if isinstance(act, DiaActWithProb): self.act = copy.deepcopy(act.act) self.items = copy.deepcopy(act.items) self.P_Au_O = act.P_Au_O else: self.act = copy.deepcopy(act.act) self.items = copy.deepcopy(act.items) self.P_Au_O = 1.0 else: dia_act = dact._InParseAct(act) self.act = dia_act['act'] self.items = dia_act['slots'] self.P_Au_O = 1.0
def __init__(self, act): dia_act = dact._InParseAct(act) self.act = dia_act['act'] self.items = dia_act['slots'] self.P_Au_O = 1.0
def __init__(self, act): # parsed is a dict of lists. 'slots' list contains dact items parsed = dact._InParseAct(act) self.act = parsed['act'] self.items = parsed['slots']