shjwudp commited on
Commit
aa884c7
·
1 Parent(s): 2a69d5c

feat: add conversation data

Browse files
Files changed (2) hide show
  1. v2ex.py +11 -3
  2. v2ex_conversation.jsonl.gz +3 -0
v2ex.py CHANGED
@@ -17,6 +17,7 @@ _HOMEPAGE = "https://huggingface.co/datasets/Dialogue-Model-Research-Group/v2ex"
17
  _DATA_URLS = {
18
  "topic": "v2ex_topic.jsonl.gz",
19
  "replies": "v2ex_replies.jsonl.gz",
 
20
  }
21
 
22
 
@@ -107,11 +108,17 @@ class V2EX(datasets.GeneratorBasedBuilder):
107
  },
108
  "topic_id": Value(dtype="int64", id=None),
109
  })
 
 
 
 
 
 
 
 
110
  else:
111
  raise NotImplementedError(
112
- "This task is not implemented. If you believe"
113
- " this task was recently added to the CLUE benchmark, "
114
- "please open a GitHub issue and we will add it."
115
  )
116
 
117
  return datasets.DatasetInfo(
@@ -144,3 +151,4 @@ class V2EX(datasets.GeneratorBasedBuilder):
144
  yield key, j
145
  key += 1
146
 
 
 
17
  _DATA_URLS = {
18
  "topic": "v2ex_topic.jsonl.gz",
19
  "replies": "v2ex_replies.jsonl.gz",
20
+ "conversation": "v2ex_conversation.jsonl.gz",
21
  }
22
 
23
 
 
108
  },
109
  "topic_id": Value(dtype="int64", id=None),
110
  })
111
+ elif self.config.name == "conversation":
112
+ features = datasets.Features({
113
+ "conversation": Sequence({
114
+ "username": Value("string"),
115
+ "post": Value("string"),
116
+ }),
117
+ "turns": Value(dtype="int64"),
118
+ })
119
  else:
120
  raise NotImplementedError(
121
+ "This dataset is not implemented."
 
 
122
  )
123
 
124
  return datasets.DatasetInfo(
 
151
  yield key, j
152
  key += 1
153
 
154
+
v2ex_conversation.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72950d45a56ee4c652df84f5b7175f0dd664d1a0709e7f51242a3c193396a9ab
3
+ size 582794148