init
Browse files
tweet_topic_multilingual.py
CHANGED
@@ -6,7 +6,7 @@ import datasets
|
|
6 |
|
7 |
logger = datasets.logging.get_logger(__name__)
|
8 |
_DESCRIPTION = """[TweetTopicMultilingual](TBA)"""
|
9 |
-
_VERSION = "0.0.
|
10 |
_CITATION = """TBA"""
|
11 |
_HOME_PAGE = "https://cardiffnlp.github.io"
|
12 |
_NAME = "tweet_topic_multilingual"
|
@@ -145,9 +145,9 @@ class TweetTopicMultilingual(datasets.GeneratorBasedBuilder):
|
|
145 |
_key = 0
|
146 |
if type(filepath) is not List:
|
147 |
filepath = [filepath]
|
148 |
-
for
|
149 |
logger.info("generating examples from = %s", i)
|
150 |
-
with open(
|
151 |
_list = [json.loads(i) for i in f.read().split("\n") if len(i) > 0]
|
152 |
for i in _list:
|
153 |
yield _key, i
|
|
|
6 |
|
7 |
logger = datasets.logging.get_logger(__name__)
|
8 |
_DESCRIPTION = """[TweetTopicMultilingual](TBA)"""
|
9 |
+
_VERSION = "0.0.7"
|
10 |
_CITATION = """TBA"""
|
11 |
_HOME_PAGE = "https://cardiffnlp.github.io"
|
12 |
_NAME = "tweet_topic_multilingual"
|
|
|
145 |
_key = 0
|
146 |
if type(filepath) is not List:
|
147 |
filepath = [filepath]
|
148 |
+
for _file in filepath:
|
149 |
logger.info("generating examples from = %s", i)
|
150 |
+
with open(_file, encoding="utf-8") as f:
|
151 |
_list = [json.loads(i) for i in f.read().split("\n") if len(i) > 0]
|
152 |
for i in _list:
|
153 |
yield _key, i
|