tarekziade commited on
Commit
a138ba1
1 Parent(s): f2cd704
test/data-00000-of-00001.arrow CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4b603d6459cfe4d38a0fa0fe32ef5afc97cd909bd5df52762d7e6050f4ba72a2
3
- size 487136
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31c4c67f8342722c31fa619646792abb6d183f3adfcdb70e97a4ac30af04dd53
3
+ size 490072
test/dataset_info.json CHANGED
@@ -3,7 +3,7 @@
3
  "citation": "",
4
  "config_name": "default",
5
  "dataset_name": "generator",
6
- "dataset_size": 4829573,
7
  "description": "",
8
  "download_checksums": {},
9
  "download_size": 0,
@@ -27,11 +27,11 @@
27
  },
28
  "homepage": "",
29
  "license": "",
30
- "size_in_bytes": 4829573,
31
  "splits": {
32
  "train": {
33
  "name": "train",
34
- "num_bytes": 4829573,
35
  "num_examples": 8000,
36
  "dataset_name": "generator"
37
  }
 
3
  "citation": "",
4
  "config_name": "default",
5
  "dataset_name": "generator",
6
+ "dataset_size": 4829151,
7
  "description": "",
8
  "download_checksums": {},
9
  "download_size": 0,
 
27
  },
28
  "homepage": "",
29
  "license": "",
30
+ "size_in_bytes": 4829151,
31
  "splits": {
32
  "train": {
33
  "name": "train",
34
+ "num_bytes": 4829151,
35
  "num_examples": 8000,
36
  "dataset_name": "generator"
37
  }
test/state.json CHANGED
@@ -4,7 +4,7 @@
4
  "filename": "data-00000-of-00001.arrow"
5
  }
6
  ],
7
- "_fingerprint": "5567c9564854b97d",
8
  "_format_columns": null,
9
  "_format_kwargs": {},
10
  "_format_type": null,
 
4
  "filename": "data-00000-of-00001.arrow"
5
  }
6
  ],
7
+ "_fingerprint": "a7220b23432d06d0",
8
  "_format_columns": null,
9
  "_format_kwargs": {},
10
  "_format_type": null,
train/data-00000-of-00001.arrow CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:409bdc4ec87ac1b103ed1fe88f2881fbd171662b3384611617748d507ab00e28
3
- size 4346864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea17a70bb007568d6366aaa922932d941d416675e9e5607b6c5d7e8516c77a19
3
+ size 4343520
train/dataset_info.json CHANGED
@@ -3,7 +3,7 @@
3
  "citation": "",
4
  "config_name": "default",
5
  "dataset_name": "generator",
6
- "dataset_size": 4829573,
7
  "description": "",
8
  "download_checksums": {},
9
  "download_size": 0,
@@ -27,11 +27,11 @@
27
  },
28
  "homepage": "",
29
  "license": "",
30
- "size_in_bytes": 4829573,
31
  "splits": {
32
  "train": {
33
  "name": "train",
34
- "num_bytes": 4829573,
35
  "num_examples": 8000,
36
  "dataset_name": "generator"
37
  }
 
3
  "citation": "",
4
  "config_name": "default",
5
  "dataset_name": "generator",
6
+ "dataset_size": 4829151,
7
  "description": "",
8
  "download_checksums": {},
9
  "download_size": 0,
 
27
  },
28
  "homepage": "",
29
  "license": "",
30
+ "size_in_bytes": 4829151,
31
  "splits": {
32
  "train": {
33
  "name": "train",
34
+ "num_bytes": 4829151,
35
  "num_examples": 8000,
36
  "dataset_name": "generator"
37
  }
train/state.json CHANGED
@@ -4,7 +4,7 @@
4
  "filename": "data-00000-of-00001.arrow"
5
  }
6
  ],
7
- "_fingerprint": "0666424ffc7baa8f",
8
  "_format_columns": null,
9
  "_format_kwargs": {},
10
  "_format_type": null,
 
4
  "filename": "data-00000-of-00001.arrow"
5
  }
6
  ],
7
+ "_fingerprint": "1f79cc301fa8a535",
8
  "_format_columns": null,
9
  "_format_kwargs": {},
10
  "_format_type": null,
wikiextract.py CHANGED
@@ -178,7 +178,13 @@ class WikiExtractor:
178
  def main():
179
  nltk.download("punkt")
180
  extractor = WikiExtractor()
181
- dataset = Dataset.from_generator(extractor)
 
 
 
 
 
 
182
 
183
  train_test_split = dataset.train_test_split(test_size=0.1)
184
  dataset_dict = DatasetDict(
 
178
  def main():
179
  nltk.download("punkt")
180
  extractor = WikiExtractor()
181
+ pages = list(extractor())
182
+
183
+ def gen():
184
+ for page in pages:
185
+ yield page
186
+
187
+ dataset = Dataset.from_generator(gen)
188
 
189
  train_test_split = dataset.train_test_split(test_size=0.1)
190
  dataset_dict = DatasetDict(