Uncomment del "metadata"
Browse files- android-pl.py +2 -2
android-pl.py
CHANGED
|
@@ -28,7 +28,7 @@ class Android(datasets.GeneratorBasedBuilder):
|
|
| 28 |
"_id": datasets.Value("string"),
|
| 29 |
"title": datasets.Value("string"),
|
| 30 |
"text": datasets.Value("string"),
|
| 31 |
-
"metadata": {"tags": datasets.Sequence(feature=datasets.Value("string"))}
|
| 32 |
}),
|
| 33 |
supervised_keys=None,
|
| 34 |
)
|
|
@@ -53,6 +53,6 @@ class Android(datasets.GeneratorBasedBuilder):
|
|
| 53 |
texts = f.readlines()
|
| 54 |
for i, text in enumerate(texts):
|
| 55 |
text = json.loads(text)
|
| 56 |
-
|
| 57 |
if "title" not in text: text["title"] = ""
|
| 58 |
yield i, text
|
|
|
|
| 28 |
"_id": datasets.Value("string"),
|
| 29 |
"title": datasets.Value("string"),
|
| 30 |
"text": datasets.Value("string"),
|
| 31 |
+
#"metadata": {"tags": datasets.Sequence(feature=datasets.Value("string"))}
|
| 32 |
}),
|
| 33 |
supervised_keys=None,
|
| 34 |
)
|
|
|
|
| 53 |
texts = f.readlines()
|
| 54 |
for i, text in enumerate(texts):
|
| 55 |
text = json.loads(text)
|
| 56 |
+
if 'metadata' in text: del text['metadata']
|
| 57 |
if "title" not in text: text["title"] = ""
|
| 58 |
yield i, text
|