sh110495 commited on
Commit
b418ffd
1 Parent(s): 803f291

make dataset pstage3 format

Browse files
Files changed (2) hide show
  1. .DS_Store +0 -0
  2. klue-mrc.py +3 -4
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
klue-mrc.py CHANGED
@@ -32,8 +32,7 @@ class KoreanNewspaper(datasets.GeneratorBasedBuilder):
32
  {
33
  "context": datasets.Value("string"),
34
  "question": datasets.Value("string"),
35
- "answer_text":datasets.Value("string"),
36
- "answer_start":datasets.Value("int32"),
37
  "guid":datasets.Value("string"),
38
 
39
  }
@@ -80,13 +79,13 @@ class KoreanNewspaper(datasets.GeneratorBasedBuilder):
80
  answer = q[answer_key][0]
81
  answer_text = answer['text']
82
  answer_start = answer['answer_start']
 
83
  guid = q['guid']
84
 
85
  yield key, {
86
  "guid" : guid,
87
  "context" : context,
88
  "question" : question,
89
- "answer_text" : answer_text,
90
- "answer_start" : answer_start,
91
  }
92
  key += 1
 
32
  {
33
  "context": datasets.Value("string"),
34
  "question": datasets.Value("string"),
35
+ "answers":dict,
 
36
  "guid":datasets.Value("string"),
37
 
38
  }
 
79
  answer = q[answer_key][0]
80
  answer_text = answer['text']
81
  answer_start = answer['answer_start']
82
+ answer_data = {'answer_start' : [answer_start], 'text': [answer_text]}
83
  guid = q['guid']
84
 
85
  yield key, {
86
  "guid" : guid,
87
  "context" : context,
88
  "question" : question,
89
+ "answers" : answer_data
 
90
  }
91
  key += 1