Skip to content
Snippets Groups Projects
Unverified Commit 24f3c2da authored by 罗崚骁's avatar 罗崚骁 Committed by GitHub
Browse files

deal with white charater in XLDST evaluation (#145)

* update sumbt translation train result with evaluation mode set

* update extract values

* automatically download sumbt model

* dstc9 eval

* dstc9 xldst evaluation

* modify example

* add .gitignore

* remove precision, recall, f1

* release 250 test data

* revise evaluation

* fix file submission example

* update precision, recall, f1 calculation

* minor change

* fix a database typo

* use selectedResults for missing name

* add value unification

* fix white character issue #144
parent 732afebf
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ def unify_value(value, subtask): ...@@ -69,7 +69,7 @@ def unify_value(value, subtask):
ret[i] = unify_value(v, subtask) ret[i] = unify_value(v, subtask)
return ret return ret
return { value = {
'multiwoz': { 'multiwoz': {
'未提及': '', '未提及': '',
'none': '', 'none': '',
...@@ -81,6 +81,8 @@ def unify_value(value, subtask): ...@@ -81,6 +81,8 @@ def unify_value(value, subtask):
} }
}[subtask].get(value, value) }[subtask].get(value, value)
return ' '.join(value.strip().split())
def eval_states(gt, pred, subtask): def eval_states(gt, pred, subtask):
def exception(description, **kargs): def exception(description, **kargs):
...@@ -135,7 +137,6 @@ def eval_states(gt, pred, subtask): ...@@ -135,7 +137,6 @@ def eval_states(gt, pred, subtask):
return { return {
'status': 'ok', 'status': 'ok',
'joint accuracy': joint_acc / joint_tot, 'joint accuracy': joint_acc / joint_tot,
# 'slot accuracy': slot_acc / slot_tot,
'slot': { 'slot': {
'accuracy': slot_acc / slot_tot, 'accuracy': slot_acc / slot_tot,
'precision': precision, 'precision': precision,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment