Update openwebtext_split.py
Browse files- openwebtext_split.py +4 -3
openwebtext_split.py
CHANGED
@@ -58,9 +58,10 @@ def custom_iter_archive(path_or_buf, _filter=lambda x: True):
|
|
58 |
continue
|
59 |
file_obj = stream.extractfile(tarinfo)
|
60 |
decompressed = tarfile.open(fileobj=file_obj, mode='r:xz')
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
64 |
stream.members = []
|
65 |
del stream
|
66 |
if hasattr(path_or_buf, "read"):
|
|
|
58 |
continue
|
59 |
file_obj = stream.extractfile(tarinfo)
|
60 |
decompressed = tarfile.open(fileobj=file_obj, mode='r:xz')
|
61 |
+
for j, xzinfo in enumerate(decompressed):
|
62 |
+
print(xzinfo.name)
|
63 |
+
txt_file = decompressed.extractfile(xzinfo)
|
64 |
+
yield xzinfo.name, txt_file
|
65 |
stream.members = []
|
66 |
del stream
|
67 |
if hasattr(path_or_buf, "read"):
|