asahi417 commited on
Commit
1cd2c60
1 Parent(s): f113fa7

Update tweet_sentiment_multilingual.py

Browse files
Files changed (1) hide show
  1. tweet_sentiment_multilingual.py +3 -3
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=_NAME, type=l, version=datasets.Version(_VERSION), description=_DESCRIPTION) for l in _LANGUAGE
48
  ]
49
- BUILDER_CONFIGS += [TweetSentimentMultilingualConfig(name=_NAME, type='all', version=datasets.Version(_VERSION), description=_DESCRIPTION)]
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.type])
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