diff --git a/README.md b/README.md index ffd1e93141ee77ba61ee6ec404e7b0049f621e05..01408f9f3d7a60fe3f0963bfb31a4c0000ccb88d 100755 --- a/README.md +++ b/README.md @@ -204,9 +204,9 @@ evaluation of our pre-trained models are: (joint acc.) | type | CrossWOZ-en | MultiWOZ-zh | | ----- | ----------- | ----------- | -| val | 12.4% | 45.1% | -| test | 12.4% | 43.5% | -| human_val | 10.6% | 49.4% | +| val | 12.4% | 48.5% | +| test | 12.4% | 46.0% | +| human_val | 10.6% | 47.4% | `human_val` option will make the model evaluate on the validation set translated by human. diff --git a/convlab2/dst/sumbt/multiwoz_zh/sumbt.py b/convlab2/dst/sumbt/multiwoz_zh/sumbt.py index 96e83f01a29062ab7a0059d9beef70240a82cb35..047519f656481422cc3ea66cb280e6b911bff1fb 100644 --- a/convlab2/dst/sumbt/multiwoz_zh/sumbt.py +++ b/convlab2/dst/sumbt/multiwoz_zh/sumbt.py @@ -582,28 +582,20 @@ class SUMBTTracker(DST): new_belief_state = copy.deepcopy(prev_state['belief_state']) for state in pred_states: domain, slot, value = state.split('-', 2) - - if slot not in ['name', 'book']: - if domain not in new_belief_state: - if domain == 'bus': - continue - else: - raise Exception( - 'Error: domain <{}> not in belief state'.format(domain)) # slot = REF_SYS_DA[domain.capitalize()].get(slot, slot) assert 'semi' in new_belief_state[domain] assert 'book' in new_belief_state[domain] + domain_dic = new_belief_state[domain] if '预订' in slot: assert slot.startswith('预订') + slot = slot[2:] + assert slot in domain_dic['book'] - domain_dic = new_belief_state[domain] if slot in domain_dic['semi']: new_belief_state[domain]['semi'][slot] = value # normalize_value(self.value_dict, domain, slot, value) elif slot in domain_dic['book']: new_belief_state[domain]['book'][slot] = value - elif slot.lower() in domain_dic['book']: - new_belief_state[domain]['book'][slot.lower()] = value else: with open('trade_tracker_unknown_slot.log', 'a+') as f: f.write(