Datasets:
Update tweet_sentiment_multilingual.py
Browse files
tweet_sentiment_multilingual.py
CHANGED
@@ -44,9 +44,9 @@ class TweetSentimentMultilingualConfig(datasets.BuilderConfig):
|
|
44 |
class TweetSentimentMultilingual(datasets.GeneratorBasedBuilder):
|
45 |
|
46 |
BUILDER_CONFIGS = [
|
47 |
-
TweetSentimentMultilingualConfig(name=
|
48 |
]
|
49 |
-
BUILDER_CONFIGS += [TweetSentimentMultilingualConfig(name=
|
50 |
|
51 |
def _info(self):
|
52 |
names = ["negative", "neutral", "positive"]
|
@@ -61,7 +61,7 @@ class TweetSentimentMultilingual(datasets.GeneratorBasedBuilder):
|
|
61 |
)
|
62 |
|
63 |
def _split_generators(self, dl_manager):
|
64 |
-
downloaded_file = dl_manager.download_and_extract(_URLS[self.config.
|
65 |
return [datasets.SplitGenerator(name=i, gen_kwargs={"filepath": downloaded_file[str(i)]})
|
66 |
for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
|
67 |
|
|
|
44 |
class TweetSentimentMultilingual(datasets.GeneratorBasedBuilder):
|
45 |
|
46 |
BUILDER_CONFIGS = [
|
47 |
+
TweetSentimentMultilingualConfig(name=l, version=datasets.Version(_VERSION), description=_DESCRIPTION) for l in _LANGUAGE
|
48 |
]
|
49 |
+
BUILDER_CONFIGS += [TweetSentimentMultilingualConfig(name='all', version=datasets.Version(_VERSION), description=_DESCRIPTION)]
|
50 |
|
51 |
def _info(self):
|
52 |
names = ["negative", "neutral", "positive"]
|
|
|
61 |
)
|
62 |
|
63 |
def _split_generators(self, dl_manager):
|
64 |
+
downloaded_file = dl_manager.download_and_extract(_URLS[self.config.name])
|
65 |
return [datasets.SplitGenerator(name=i, gen_kwargs={"filepath": downloaded_file[str(i)]})
|
66 |
for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
|
67 |
|