Commit
·
81ea4f5
1
Parent(s):
8ad0a43
feat
Browse files- VieGLUE.py +3 -1
VieGLUE.py
CHANGED
@@ -513,10 +513,12 @@ class VNExpress(datasets.GeneratorBasedBuilder):
|
|
513 |
all_samples = json.load(f)
|
514 |
# print(f"Loaded {len(all_samples)} samples from {file_path}")
|
515 |
# print(f"Sample: {all_samples[0]}")
|
|
|
|
|
516 |
for sample in all_samples:
|
517 |
yield id_, {
|
518 |
"idx": id_,
|
519 |
-
"label": sample["label"]
|
520 |
**{f: sample[f] for f in features},
|
521 |
}
|
522 |
|
|
|
513 |
all_samples = json.load(f)
|
514 |
# print(f"Loaded {len(all_samples)} samples from {file_path}")
|
515 |
# print(f"Sample: {all_samples[0]}")
|
516 |
+
if sample["label"] is None or sample["label"] == "":
|
517 |
+
sample["label"] = -1
|
518 |
for sample in all_samples:
|
519 |
yield id_, {
|
520 |
"idx": id_,
|
521 |
+
"label": sample["label"],
|
522 |
**{f: sample[f] for f in features},
|
523 |
}
|
524 |
|