zqwerty commited on
Commit
9ac2bdd
1 Parent(s): 006fb13

update data & script

Browse files
Files changed (5) hide show
  1. CrossWOZ.py +1 -13
  2. data.zip +2 -2
  3. test.json.zip +0 -3
  4. train.json.zip +0 -3
  5. val.json.zip +0 -3
CrossWOZ.py CHANGED
@@ -41,13 +41,6 @@ _HOMEPAGE = "https://github.com/thu-coai/CrossWOZ"
41
 
42
  _LICENSE = "Apache License, Version 2.0"
43
 
44
- _URLs = {
45
- # "train": "train.json.zip",
46
- # "val": "val.json.zip",
47
- # "test": "test.json.zip"
48
- "all": "data.zip"
49
- }
50
-
51
 
52
  class CrossWOZ(datasets.GeneratorBasedBuilder):
53
  """CrossWOZ: A Large-Scale Chinese Cross-Domain Task-Oriented Dialogue Dataset"""
@@ -214,7 +207,7 @@ class CrossWOZ(datasets.GeneratorBasedBuilder):
214
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
215
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
216
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
217
- data_dir = os.path.join(dl_manager.download_and_extract(_URLs["all"]), "data")
218
  return [
219
  datasets.SplitGenerator(
220
  name=datasets.Split.TRAIN,
@@ -248,11 +241,6 @@ class CrossWOZ(datasets.GeneratorBasedBuilder):
248
  """ Yields examples as (key, example) tuples. """
249
  # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
250
  # The `key` is here for legacy reason (tfds) and is not important in itself.
251
- print(filepath)
252
- print(os.path.dirname(filepath))
253
- print(os.listdir(os.path.dirname(filepath)))
254
- print(os.path.curdir)
255
- print(os.listdir(os.path.curdir))
256
  def convert_goal(raw_goal):
257
  goal = []
258
  for subgoal in raw_goal:
 
41
 
42
  _LICENSE = "Apache License, Version 2.0"
43
 
 
 
 
 
 
 
 
44
 
45
  class CrossWOZ(datasets.GeneratorBasedBuilder):
46
  """CrossWOZ: A Large-Scale Chinese Cross-Domain Task-Oriented Dialogue Dataset"""
 
207
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
208
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
209
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
210
+ data_dir = dl_manager.download_and_extract("data.zip")
211
  return [
212
  datasets.SplitGenerator(
213
  name=datasets.Split.TRAIN,
 
241
  """ Yields examples as (key, example) tuples. """
242
  # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
243
  # The `key` is here for legacy reason (tfds) and is not important in itself.
 
 
 
 
 
244
  def convert_goal(raw_goal):
245
  goal = []
246
  for subgoal in raw_goal:
data.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9932d09339518ea4a41d94cda38bbbec99e57dde895c9102776b0aaaf0911708
3
- size 16360257
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c70e36e62f501a77537dedbd0340afeec9899f7c24574505785e372ba25894c2
3
+ size 16338148
test.json.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e57703894995211bba8638f130dc7df81e8992b71f3c05c10022ad23d6ca5310
3
- size 1367462
 
 
 
 
train.json.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b81f6a0845011bb4593d21dd58e2d76af4dd5d52e300ecc68cb8dee17ccc3cf8
3
- size 13624132
 
 
 
 
val.json.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b2b717990f6f0a1c98daaf5dc465e61d42f7de69c0d31e88e674275b1f34c94c
3
- size 1368203