fix preview
Browse files- wikipedia.py +5 -5
wikipedia.py
CHANGED
@@ -470,8 +470,8 @@ class Wikipedia(datasets.ArrowBasedBuilder):
|
|
470 |
"""This function returns the examples in the raw (text) form."""
|
471 |
logger.info("generating examples from = %s", filepath)
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
470 |
"""This function returns the examples in the raw (text) form."""
|
471 |
logger.info("generating examples from = %s", filepath)
|
472 |
|
473 |
+
with open(filepath, "rb") as f:
|
474 |
+
pf = pq.ParquetFile(filepath)
|
475 |
+
for group_i in range(pf.num_row_groups):
|
476 |
+
tbl = pf.read_row_group(group_i)
|
477 |
+
yield group_i, tbl
|