init
Browse files
tweet_topic_multilingual.py
CHANGED
@@ -54,10 +54,9 @@ class TweetTopicMultilingual(datasets.GeneratorBasedBuilder):
|
|
54 |
_key = 0
|
55 |
logger.info("generating examples from = %s", filepath)
|
56 |
with open(filepath, encoding="utf-8") as f:
|
57 |
-
_list = f.read().split('\n')
|
58 |
for i in _list:
|
59 |
-
|
60 |
-
yield _key, data
|
61 |
_key += 1
|
62 |
|
63 |
def _info(self):
|
|
|
54 |
_key = 0
|
55 |
logger.info("generating examples from = %s", filepath)
|
56 |
with open(filepath, encoding="utf-8") as f:
|
57 |
+
_list = [json.loads(i) for i in f.read().split('\n') if i]
|
58 |
for i in _list:
|
59 |
+
yield _key, i
|
|
|
60 |
_key += 1
|
61 |
|
62 |
def _info(self):
|