convlab2.dst.rule.multiwoz package

Submodules

convlab2.dst.rule.multiwoz.dst module

class convlab2.dst.rule.multiwoz.dst.RuleDST

Bases: convlab2.dst.dst.DST

Rule based DST which trivially updates new values from NLU result to states.

Attributes:
state(dict):

Dialog state. Function convlab2.util.multiwoz.state.default_state returns a default state.

value_dict(dict):

It helps check whether user_act has correct content.

init_session()

Initialize self.state with a default state, which convlab2.util.multiwoz.state.default_state returns.

update(user_act=None)

update belief_state, request_state :param user_act: :return:

convlab2.dst.rule.multiwoz.dst_util module

convlab2.dst.rule.multiwoz.dst_util.minDistance(word1, word2)

The minimum edit distance between word 1 and 2.

convlab2.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.

convlab2.dst.rule.multiwoz.dst_util.special_match(domain, slot, value)

special slot fuzzy matching

convlab2.dst.rule.multiwoz.dst_util.str_similar(a, b)

Module contents