Commit
·
38cc96a
1
Parent(s):
323a42b
need itertools
Browse files- generic_conll.py +2 -2
generic_conll.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# Lint as: python3
|
3 |
|
4 |
import os
|
5 |
-
|
6 |
import datasets
|
7 |
|
8 |
|
@@ -61,7 +61,7 @@ class Conll(datasets.GeneratorBasedBuilder):
|
|
61 |
return splits
|
62 |
|
63 |
def _generate_examples(self, files):
|
64 |
-
for filepath in files:
|
65 |
logger.info("⏳ Generating examples from = %s", filepath)
|
66 |
with open(filepath, encoding="utf-8") as f:
|
67 |
guid = 0
|
|
|
2 |
# Lint as: python3
|
3 |
|
4 |
import os
|
5 |
+
import itertools
|
6 |
import datasets
|
7 |
|
8 |
|
|
|
61 |
return splits
|
62 |
|
63 |
def _generate_examples(self, files):
|
64 |
+
for file_idx, filepath in enumerate(itertools.chain.from_iterable(files)):
|
65 |
logger.info("⏳ Generating examples from = %s", filepath)
|
66 |
with open(filepath, encoding="utf-8") as f:
|
67 |
guid = 0
|