Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emoUS-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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
dsml
emoUS-public
Commits
823dda6d
Commit
823dda6d
authored
3 years ago
by
zqwerty
Browse files
Options
Downloads
Patches
Plain Diff
rename goal:inform&request
parent
c7c36a80
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/unified_datasets/README.md
+2
-2
2 additions, 2 deletions
data/unified_datasets/README.md
data/unified_datasets/check.py
+8
-8
8 additions, 8 deletions
data/unified_datasets/check.py
with
10 additions
and
10 deletions
data/unified_datasets/README.md
+
2
−
2
View file @
823dda6d
...
@@ -78,8 +78,8 @@ We first introduce the unified format of `ontology` and `dialogues`. To transfor
...
@@ -78,8 +78,8 @@ We first introduce the unified format of `ontology` and `dialogues`. To transfor
-
`domains`
: (
*list*
) involved domains in this dialogue.
-
`domains`
: (
*list*
) involved domains in this dialogue.
-
`goal`
: (
*dict*
)
-
`goal`
: (
*dict*
)
-
`description`
: (
*str*
, could be empty) a string describes the user goal.
-
`description`
: (
*str*
, could be empty) a string describes the user goal.
-
`
constraints
`
: (
*dict*
, could be empty) same format as dialogue state of involved domains but with only filled slots as constraints.
-
`
inform
`
: (
*dict*
, could be empty) same format as dialogue state of involved domains but with only filled slots as constraints.
-
`requ
irements
`
: (
*dict*
, could be empty) same format as dialogue state of involved domains but with only empty requ
ir
ed slots.
-
`requ
est
`
: (
*dict*
, could be empty) same format as dialogue state of involved domains but with only empty requ
est
ed slots.
-
`turns`
: (
*list*
of
*dict*
)
-
`turns`
: (
*list*
of
*dict*
)
-
`speaker`
: (
*str*
) "user" or "system".
-
`speaker`
: (
*str*
) "user" or "system".
-
`utterance`
: (
*str*
)
-
`utterance`
: (
*str*
)
...
...
This diff is collapsed.
Click to expand it.
data/unified_datasets/check.py
+
8
−
8
View file @
823dda6d
...
@@ -162,16 +162,16 @@ def check_dialogues(name, dialogues, ontology):
...
@@ -162,16 +162,16 @@ def check_dialogues(name, dialogues, ontology):
goal
=
dialogue
[
'
goal
'
]
goal
=
dialogue
[
'
goal
'
]
assert
isinstance
(
goal
[
'
description
'
],
str
),
f
'
{
dialogue_id
}
\t
goal description
{
goal
[
"
description
"
]
}
should be string
'
assert
isinstance
(
goal
[
'
description
'
],
str
),
f
'
{
dialogue_id
}
\t
goal description
{
goal
[
"
description
"
]
}
should be string
'
assert
isinstance
(
goal
[
'
constraints
'
],
dict
),
f
'
{
dialogue_id
}
\t
goal
constraints
{
goal
[
"
constraints
"
]
}
should be dict
'
assert
isinstance
(
goal
[
'
inform
'
],
dict
),
f
'
{
dialogue_id
}
\t
goal
inform
{
goal
[
"
inform
"
]
}
should be dict
'
assert
isinstance
(
goal
[
'
requ
irements
'
],
dict
),
f
'
{
dialogue_id
}
\t
goal requ
irements
{
goal
[
"
requ
irements
"
]
}
should be dict
'
assert
isinstance
(
goal
[
'
requ
est
'
],
dict
),
f
'
{
dialogue_id
}
\t
goal requ
est
{
goal
[
"
requ
est
"
]
}
should be dict
'
for
domain_name
,
domain
in
goal
[
'
constraints
'
].
items
():
for
domain_name
,
domain
in
goal
[
'
inform
'
].
items
():
for
slot_name
,
value
in
domain
.
items
():
for
slot_name
,
value
in
domain
.
items
():
check_dsv
(
domain_name
,
slot_name
,
value
,
prefix
=
f
'
{
dialogue_id
}
:goal:
constraints
'
)
check_dsv
(
domain_name
,
slot_name
,
value
,
prefix
=
f
'
{
dialogue_id
}
:goal:
inform
'
)
assert
value
!=
""
,
f
'
{
dialogue_id
}
\t
should set non-empty value in goal
constraints
{
goal
[
"
constraints
"
]
}
'
assert
value
!=
""
,
f
'
{
dialogue_id
}
\t
should set non-empty value in goal
inform
{
goal
[
"
inform
"
]
}
'
for
domain_name
,
domain
in
goal
[
'
requ
irements
'
].
items
():
for
domain_name
,
domain
in
goal
[
'
requ
est
'
].
items
():
for
slot_name
,
value
in
domain
.
items
():
for
slot_name
,
value
in
domain
.
items
():
check_dsv
(
domain_name
,
slot_name
,
value
,
prefix
=
f
'
{
dialogue_id
}
:goal:requ
irements
'
)
check_dsv
(
domain_name
,
slot_name
,
value
,
prefix
=
f
'
{
dialogue_id
}
:goal:requ
est
'
)
assert
value
==
""
,
f
'
{
dialogue_id
}
\t
should set empty value in goal requ
irements
{
goal
[
"
requ
irements
"
]
}
'
assert
value
==
""
,
f
'
{
dialogue_id
}
\t
should set empty value in goal requ
est
{
goal
[
"
requ
est
"
]
}
'
turns
=
dialogue
[
'
turns
'
]
turns
=
dialogue
[
'
turns
'
]
cur_stat
[
'
utterances
'
]
+=
len
(
turns
)
cur_stat
[
'
utterances
'
]
+=
len
(
turns
)
...
...
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