tatk.dst.rule.multiwoz package¶
Submodules¶
tatk.dst.rule.multiwoz.dst module¶
-
class
tatk.dst.rule.multiwoz.dst.RuleDST¶ Bases:
tatk.dst.dst.DSTRule based DST which trivially updates new values from NLU result to states.
- Attributes:
- state(dict):
Dialog state. Function
tatk.util.multiwoz.state.default_statereturns a default state.- value_dict(dict):
It helps check whether
user_acthas correct content.
-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
init_session()¶ Initialize
self.statewith a default state, whichtatk.util.multiwoz.state.default_statereturns.
-
update(user_act=None)¶ update belief_state, request_state :param user_act: :return:
tatk.dst.rule.multiwoz.dst_util module¶
-
tatk.dst.rule.multiwoz.dst_util.minDistance(word1, word2)¶ The minimum edit distance between word 1 and 2.
-
tatk.dst.rule.multiwoz.dst_util.normalize_value(value_set, domain, slot, value)¶ Normalized the value produced by NLU module to map it to the ontology value space.
- Args:
- value_set (dict):
The value set of task ontology.
- domain (str):
The domain of the slot-value pairs.
- slot (str):
The slot of the value.
- value (str):
The raw value detected by NLU module.
- Returns:
value (str): The normalized value, which fits with the domain ontology.
-
tatk.dst.rule.multiwoz.dst_util.special_match(domain, slot, value)¶ special slot fuzzy matching
-
tatk.dst.rule.multiwoz.dst_util.str_similar(a, b)¶