albertvillanova HF staff commited on
Commit
fef91cf
1 Parent(s): 0e5ded6

Enable dataset viewer by hosting data files (#3)

Browse files

- Host data file (b4b3e8b855a72900fdbd655411531d3f282b5346)
- Update loading script (e44149ad686da2af3584f463fcd645a9ab14bfad)
- Update dataset card (fd0583cc7387227af22f0d901407511f18fcf7fe)
- Delete legacy metadata JSON file (79c5ab731b56473f776681a44e5790341d8e9136)

Files changed (4) hide show
  1. README.md +24 -11
  2. data.zip +3 -0
  3. dataset_infos.json +0 -0
  4. senti_lex.py +3 -17
README.md CHANGED
@@ -1546,7 +1546,7 @@ config_names:
1546
 
1547
  - **Homepage:** https://sites.google.com/site/datascienceslab/projects/multilingualsentiment
1548
  - **Repository:** https://www.kaggle.com/rtatman/sentiment-lexicons-for-81-languages
1549
- - **Paper:** [Needs More Information]
1550
  - **Leaderboard:** [Needs More Information]
1551
  - **Point of Contact:** [Needs More Information]
1552
 
@@ -1716,19 +1716,32 @@ Zhoa
1716
 
1717
  ### Licensing Information
1718
 
1719
- GNU General Public License v3
 
 
 
 
1720
 
1721
  ### Citation Information
1722
- @inproceedings{inproceedings,
1723
- author = {Chen, Yanqing and Skiena, Steven},
1724
- year = {2014},
1725
- month = {06},
1726
- pages = {383-389},
1727
- title = {Building Sentiment Lexicons for All Major Languages},
1728
- volume = {2},
1729
- journal = {52nd Annual Meeting of the Association for Computational Linguistics, ACL 2014 - Proceedings of the Conference},
1730
- doi = {10.3115/v1/P14-2063}
 
 
 
 
 
 
 
1731
  }
 
 
1732
  ### Contributions
1733
 
1734
  Thanks to [@KMFODA](https://github.com/KMFODA) for adding this dataset.
1546
 
1547
  - **Homepage:** https://sites.google.com/site/datascienceslab/projects/multilingualsentiment
1548
  - **Repository:** https://www.kaggle.com/rtatman/sentiment-lexicons-for-81-languages
1549
+ - **Paper:** https://aclanthology.org/P14-2063/
1550
  - **Leaderboard:** [Needs More Information]
1551
  - **Point of Contact:** [Needs More Information]
1552
 
1716
 
1717
  ### Licensing Information
1718
 
1719
+ GNU General Public License v3.
1720
+
1721
+ It is distributed here under the [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0.html).
1722
+ Note that this is the full GPL, which allows many free uses, but does not allow its incorporation into any type of distributed proprietary software, even in part or in translation.
1723
+ For commercial applications please contact the dataset creators (see "Citation Information").
1724
 
1725
  ### Citation Information
1726
+
1727
+ This dataset was collected by Yanqing Chen and Steven Skiena. If you use it in your work, please cite the following paper:
1728
+
1729
+ ```bibtex
1730
+ @inproceedings{chen-skiena-2014-building,
1731
+ title = "Building Sentiment Lexicons for All Major Languages",
1732
+ author = "Chen, Yanqing and
1733
+ Skiena, Steven",
1734
+ booktitle = "Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
1735
+ month = jun,
1736
+ year = "2014",
1737
+ address = "Baltimore, Maryland",
1738
+ publisher = "Association for Computational Linguistics",
1739
+ url = "https://aclanthology.org/P14-2063",
1740
+ doi = "10.3115/v1/P14-2063",
1741
+ pages = "383--389",
1742
  }
1743
+ ```
1744
+
1745
  ### Contributions
1746
 
1747
  Thanks to [@KMFODA](https://github.com/KMFODA) for adding this dataset.
data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47fbb054dbf989dee3283f006139c79774b007f4727fe50205f16b5e410f75fb
3
+ size 1621755
dataset_infos.json DELETED
The diff for this file is too large to render. See raw diff
senti_lex.py CHANGED
@@ -41,7 +41,8 @@ _HOMEPAGE = "https://sites.google.com/site/datascienceslab/projects/multilingual
41
 
42
  _LICENSE = "GNU General Public License v3"
43
 
44
- _URLs = "https://www.kaggle.com/rtatman/sentiment-lexicons-for-81-languages"
 
45
 
46
  LANGS = [
47
  "af",
@@ -135,17 +136,6 @@ class SentiLex(datasets.GeneratorBasedBuilder):
135
 
136
  VERSION = datasets.Version("1.1.0")
137
 
138
- @property
139
- def manual_download_instructions(self):
140
- return """\
141
- You should download the dataset from https://www.kaggle.com/rtatman/sentiment-lexicons-for-81-languages
142
- The webpage requires registration.
143
- After downloading, please put the files in a dir of your choice,
144
- which will be used as a manual_dir, e.g. `~/.manual_dirs/senti_lex`
145
- SentiLex can then be loaded via:
146
- `datasets.load_dataset("newsroom", data_dir="~/.manual_dirs/senti_lex")`.
147
- """
148
-
149
  BUILDER_CONFIGS = [
150
  datasets.BuilderConfig(
151
  name=i,
@@ -180,11 +170,7 @@ class SentiLex(datasets.GeneratorBasedBuilder):
180
 
181
  def _split_generators(self, dl_manager):
182
  """Returns SplitGenerators."""
183
- data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
184
- if not os.path.exists(data_dir):
185
- raise FileNotFoundError(
186
- f"{data_dir} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('newsroom', data_dir=...)` that includes files unzipped from the reclor zip. Manual download instructions: {self.manual_download_instructions}"
187
- )
188
  return [
189
  datasets.SplitGenerator(
190
  name=datasets.Split.TRAIN,
41
 
42
  _LICENSE = "GNU General Public License v3"
43
 
44
+ # Origin data from: "https://www.kaggle.com/rtatman/sentiment-lexicons-for-81-languages"
45
+ _URL = "data.zip"
46
 
47
  LANGS = [
48
  "af",
136
 
137
  VERSION = datasets.Version("1.1.0")
138
 
 
 
 
 
 
 
 
 
 
 
 
139
  BUILDER_CONFIGS = [
140
  datasets.BuilderConfig(
141
  name=i,
170
 
171
  def _split_generators(self, dl_manager):
172
  """Returns SplitGenerators."""
173
+ data_dir = dl_manager.download_and_extract(_URL)
 
 
 
 
174
  return [
175
  datasets.SplitGenerator(
176
  name=datasets.Split.TRAIN,