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
0ac85ac3
Commit
0ac85ac3
authored
4 years ago
by
function2
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:thu-coai/ConvLab-2
parents
65499be0
bbad3cb4
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/task/multiwoz/goal_generator.py
+7
-5
7 additions, 5 deletions
convlab2/task/multiwoz/goal_generator.py
with
7 additions
and
5 deletions
convlab2/task/multiwoz/goal_generator.py
+
7
−
5
View file @
0ac85ac3
...
...
@@ -45,6 +45,7 @@ templates = {
'
fail_info food
'
:
'
If there is no such restaurant, how about one that serves {} food.
'
,
'
fail_info area
'
:
'
If there is no such restaurant, how about one in the {} area.
'
,
'
fail_info pricerange
'
:
'
If there is no such restaurant, how about one in the {} price range.
'
,
'
fail_info name
'
:
'
If there is no such restaurant, how about one called {}.
'
,
'
fail_book time
'
:
'
If the booking fails how about {}.
'
,
'
fail_book day
'
:
'
If the booking fails how about {}.
'
},
...
...
@@ -69,6 +70,7 @@ templates = {
'
fail_info parking no
'
:
'
If there is no such hotel, how about one that does not has free parking.
'
,
'
fail_info internet yes
'
:
'
If there is no such hotel, how about one that has free wifi.
'
,
'
fail_info internet no
'
:
'
If there is no such hotel, how about one that does not has free wifi.
'
,
'
fail_info name
'
:
'
If there is no such restaurant, how about one called {}.
'
,
'
fail_book stay
'
:
'
If the booking fails how about {} nights.
'
,
'
fail_book day
'
:
'
If the booking fails how about {}.
'
},
...
...
@@ -79,7 +81,8 @@ templates = {
'
type
'
:
'
The attraction should be in the type of {}.
'
,
'
name
'
:
'
You are looking for a particular attraction. Its name is called {}.
'
,
'
fail_info type
'
:
'
If there is no such attraction, how about one that is in the type of {}.
'
,
'
fail_info area
'
:
'
If there is no such attraction, how about one in the {} area.
'
'
fail_info area
'
:
'
If there is no such attraction, how about one in the {} area.
'
,
'
fail_info name
'
:
'
If there is no such restaurant, how about one called {}.
'
,
},
'
taxi
'
:
{
'
intro
'
:
'
You are also looking for a taxi.
'
,
...
...
@@ -546,10 +549,6 @@ class GoalGenerator:
del
user_goal
[
'
train
'
]
domain_ordering
=
tuple
(
list
(
domain_ordering
).
remove
(
'
train
'
))
for
domain
in
user_goal
:
if
not
user_goal
[
domain
][
'
info
'
]:
user_goal
[
domain
][
'
info
'
]
=
{
'
none
'
:
'
none
'
}
user_goal
[
'
domain_ordering
'
]
=
domain_ordering
return
user_goal
...
...
@@ -619,6 +618,9 @@ class GoalGenerator:
'
leaveAt
'
])))
message
.
append
(
'
'
.
join
(
m
))
else
:
if
dom
==
'
police
'
:
assert
len
(
state
[
info
])
==
0
message
.
append
(
'
'
.
join
(
m
))
while
len
(
state
[
info
])
>
0
:
num_acts
=
random
.
randint
(
1
,
min
(
len
(
state
[
info
]),
3
))
slots
=
random
.
sample
(
list
(
state
[
info
].
keys
()),
num_acts
)
...
...
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