correct wrong feature name
Browse files- klue-re.py +5 -8
klue-re.py
CHANGED
@@ -32,24 +32,22 @@ class KoreanNewspaper(datasets.GeneratorBasedBuilder):
|
|
32 |
{
|
33 |
"guid": datasets.Value("string"),
|
34 |
"label": datasets.Value("string"),
|
35 |
-
"object_entity":
|
36 |
{
|
37 |
"word": datasets.Value("string"),
|
38 |
"start_idx": datasets.Value("int32"),
|
39 |
"end_idx": datasets.Value("int32"),
|
40 |
"type": datasets.Value("string"),
|
41 |
-
}
|
42 |
-
),
|
43 |
"sentence": datasets.Value("string"),
|
44 |
"source": datasets.Value("string"),
|
45 |
-
"subject_entity":
|
46 |
{
|
47 |
"word": datasets.Value("string"),
|
48 |
"start_idx": datasets.Value("int32"),
|
49 |
"end_idx": datasets.Value("int32"),
|
50 |
"type": datasets.Value("string"),
|
51 |
}
|
52 |
-
),
|
53 |
}
|
54 |
),
|
55 |
# No default supervised_keys (as we have to pass both question
|
@@ -75,11 +73,10 @@ class KoreanNewspaper(datasets.GeneratorBasedBuilder):
|
|
75 |
for info in data :
|
76 |
guid = info['guid']
|
77 |
label = info['label']
|
78 |
-
object_entity =
|
79 |
-
subject_entity =
|
80 |
source = info['source']
|
81 |
sentence = info['sentence']
|
82 |
-
print(info)
|
83 |
|
84 |
yield key, {
|
85 |
"guid" : guid,
|
|
|
32 |
{
|
33 |
"guid": datasets.Value("string"),
|
34 |
"label": datasets.Value("string"),
|
35 |
+
"object_entity":
|
36 |
{
|
37 |
"word": datasets.Value("string"),
|
38 |
"start_idx": datasets.Value("int32"),
|
39 |
"end_idx": datasets.Value("int32"),
|
40 |
"type": datasets.Value("string"),
|
41 |
+
},
|
|
|
42 |
"sentence": datasets.Value("string"),
|
43 |
"source": datasets.Value("string"),
|
44 |
+
"subject_entity":
|
45 |
{
|
46 |
"word": datasets.Value("string"),
|
47 |
"start_idx": datasets.Value("int32"),
|
48 |
"end_idx": datasets.Value("int32"),
|
49 |
"type": datasets.Value("string"),
|
50 |
}
|
|
|
51 |
}
|
52 |
),
|
53 |
# No default supervised_keys (as we have to pass both question
|
|
|
73 |
for info in data :
|
74 |
guid = info['guid']
|
75 |
label = info['label']
|
76 |
+
object_entity = info['object_entity']
|
77 |
+
subject_entity = info['subject_entity']
|
78 |
source = info['source']
|
79 |
sentence = info['sentence']
|
|
|
80 |
|
81 |
yield key, {
|
82 |
"guid" : guid,
|