Datasets:
Commit
·
20f8f70
1
Parent(s):
b6d1ec2
handle missing field in English translation
Browse files
csl.py
CHANGED
|
@@ -39,4 +39,7 @@ class Csl(datasets.GeneratorBasedBuilder):
|
|
| 39 |
with gzip.open(filepath) as f:
|
| 40 |
for key, row in enumerate(f):
|
| 41 |
data = json.loads(row)
|
|
|
|
|
|
|
|
|
|
| 42 |
yield key, data
|
|
|
|
| 39 |
with gzip.open(filepath) as f:
|
| 40 |
for key, row in enumerate(f):
|
| 41 |
data = json.loads(row)
|
| 42 |
+
if "category_eng" not in data:
|
| 43 |
+
data["category_eng"] = ""
|
| 44 |
+
data["discipline_eng"] = ""
|
| 45 |
yield key, data
|