convlab2.policy.rule.crosswoz package¶
Submodules¶
convlab2.policy.rule.crosswoz.evaluate module¶
-
convlab2.policy.rule.crosswoz.evaluate.begin_active_tuple_num(data)¶
-
convlab2.policy.rule.crosswoz.evaluate.begin_da_type(data)¶
-
convlab2.policy.rule.crosswoz.evaluate.calculateF1(predict_golden)¶
-
convlab2.policy.rule.crosswoz.evaluate.calculateJointState(predict_golden)¶
-
convlab2.policy.rule.crosswoz.evaluate.calculateSlotState(predict_golden)¶
-
convlab2.policy.rule.crosswoz.evaluate.end_usr_da_type(data)¶
-
convlab2.policy.rule.crosswoz.evaluate.eval_begin_da_predict(data)¶
-
convlab2.policy.rule.crosswoz.evaluate.eval_simulator_performance(data, goal_type=None)¶
-
convlab2.policy.rule.crosswoz.evaluate.eval_state_predict(data)¶
-
convlab2.policy.rule.crosswoz.evaluate.read_zipped_json(filepath, filename)¶
convlab2.policy.rule.crosswoz.rule_simulator module¶
-
class
convlab2.policy.rule.crosswoz.rule_simulator.Simulator¶ Bases:
convlab2.policy.policy.Policy-
begin_da()¶
-
get_goal()¶
-
get_reward()¶
-
infer_goal_type(goal)¶
-
init_session(goal=None, state=None, turn_num=0, da_seq=[])¶ Init the class variables for a new session.
-
is_terminated()¶
-
predict(sys_act)¶ Predict the next agent action given dialog state.
- Args:
- state (dict or list of list):
when the policy takes dialogue state as input, the type is dict. else when the policy takes dialogue act as input, the type is list of list.
- Returns:
- action (list of list or str):
when the policy outputs dialogue act, the type is list of list. else when the policy outputs utterance directly, the type is str.
-
state_predict()¶
-
state_update(prev_user_da, prev_sys_da)¶
-