Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TUS_public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
dsml
TUS_public
Commits
1f8ed9fd
Unverified
Commit
1f8ed9fd
authored
4 years ago
by
zhangzthu
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add 'book' in DST evaluation. (#85)
parent
84ec8035
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
convlab2/dst/evaluate.py
+14
-3
14 additions, 3 deletions
convlab2/dst/evaluate.py
with
14 additions
and
3 deletions
convlab2/dst/evaluate.py
+
14
−
3
View file @
1f8ed9fd
...
...
@@ -56,13 +56,24 @@ def reformat_state(state):
state
=
state
[
'
belief_state
'
]
new_state
=
[]
for
domain
in
state
.
keys
():
domain_data
=
state
[
domain
]
if
'
semi
'
in
domain_data
:
domain_data
=
domain_data
[
'
semi
'
]
domain_data
_all
=
state
[
domain
]
if
'
semi
'
in
domain_data
_all
:
domain_data
=
domain_data
_all
[
'
semi
'
]
for
slot
in
domain_data
.
keys
():
val
=
domain_data
[
slot
]
if
val
is
not
None
and
val
not
in
[
''
,
'
not mentioned
'
,
'
未提及
'
,
'
未提到
'
,
'
没有提到
'
]:
new_state
.
append
(
domain
+
'
-
'
+
slot
+
'
-
'
+
val
)
if
'
book
'
in
domain_data_all
:
domain_data
=
domain_data_all
[
'
book
'
]
for
slot
in
domain_data
.
keys
():
if
slot
==
'
booked
'
:
continue
elif
domain
==
'
bus
'
and
slot
==
'
people
'
:
continue
else
:
val
=
domain_data
[
slot
]
if
val
is
not
None
and
val
not
in
[
''
,
'
not mentioned
'
,
'
未提及
'
,
'
未提到
'
,
'
没有提到
'
]:
new_state
.
append
(
domain
+
'
_book
'
+
'
-
'
+
slot
+
'
-
'
+
val
)
# lower
new_state
=
[
item
.
lower
()
for
item
in
new_state
]
return
new_state
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment