parquet-converter commited on
Commit
57ee915
1 Parent(s): 11a34e5

Update parquet files

Browse files
Files changed (44) hide show
  1. .DS_Store +0 -0
  2. .gitattributes +0 -51
  3. README.md +0 -41
  4. all/multilingual-sentiments-test.parquet +3 -0
  5. all/multilingual-sentiments-train.parquet +3 -0
  6. all/multilingual-sentiments-validation.parquet +3 -0
  7. arabic/multilingual-sentiments-test.parquet +3 -0
  8. arabic/multilingual-sentiments-train.parquet +3 -0
  9. arabic/multilingual-sentiments-validation.parquet +3 -0
  10. chinese/multilingual-sentiments-test.parquet +3 -0
  11. chinese/multilingual-sentiments-train.parquet +3 -0
  12. chinese/multilingual-sentiments-validation.parquet +3 -0
  13. dataset_infos.json +0 -1
  14. english/multilingual-sentiments-test.parquet +3 -0
  15. english/multilingual-sentiments-train.parquet +3 -0
  16. english/multilingual-sentiments-validation.parquet +3 -0
  17. french/multilingual-sentiments-test.parquet +3 -0
  18. french/multilingual-sentiments-train.parquet +3 -0
  19. french/multilingual-sentiments-validation.parquet +3 -0
  20. german/multilingual-sentiments-test.parquet +3 -0
  21. german/multilingual-sentiments-train.parquet +3 -0
  22. german/multilingual-sentiments-validation.parquet +3 -0
  23. hindi/multilingual-sentiments-test.parquet +3 -0
  24. hindi/multilingual-sentiments-train.parquet +3 -0
  25. hindi/multilingual-sentiments-validation.parquet +3 -0
  26. indonesian/multilingual-sentiments-test.parquet +3 -0
  27. indonesian/multilingual-sentiments-train.parquet +3 -0
  28. indonesian/multilingual-sentiments-validation.parquet +3 -0
  29. italian/multilingual-sentiments-test.parquet +3 -0
  30. italian/multilingual-sentiments-train.parquet +3 -0
  31. italian/multilingual-sentiments-validation.parquet +3 -0
  32. japanese/multilingual-sentiments-test.parquet +3 -0
  33. japanese/multilingual-sentiments-train.parquet +3 -0
  34. japanese/multilingual-sentiments-validation.parquet +3 -0
  35. malay/multilingual-sentiments-test.parquet +3 -0
  36. malay/multilingual-sentiments-train.parquet +3 -0
  37. malay/multilingual-sentiments-validation.parquet +3 -0
  38. multilingual-sentiments.py +0 -165
  39. portuguese/multilingual-sentiments-test.parquet +3 -0
  40. portuguese/multilingual-sentiments-train.parquet +3 -0
  41. portuguese/multilingual-sentiments-validation.parquet +3 -0
  42. spanish/multilingual-sentiments-test.parquet +3 -0
  43. spanish/multilingual-sentiments-train.parquet +3 -0
  44. spanish/multilingual-sentiments-validation.parquet +3 -0
.DS_Store DELETED
Binary file (6.15 kB)
 
.gitattributes DELETED
@@ -1,51 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ftz filter=lfs diff=lfs merge=lfs -text
6
- *.gz filter=lfs diff=lfs merge=lfs -text
7
- *.h5 filter=lfs diff=lfs merge=lfs -text
8
- *.joblib filter=lfs diff=lfs merge=lfs -text
9
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
- *.lz4 filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.npy filter=lfs diff=lfs merge=lfs -text
14
- *.npz filter=lfs diff=lfs merge=lfs -text
15
- *.onnx filter=lfs diff=lfs merge=lfs -text
16
- *.ot filter=lfs diff=lfs merge=lfs -text
17
- *.parquet filter=lfs diff=lfs merge=lfs -text
18
- *.pb filter=lfs diff=lfs merge=lfs -text
19
- *.pickle filter=lfs diff=lfs merge=lfs -text
20
- *.pkl filter=lfs diff=lfs merge=lfs -text
21
- *.pt filter=lfs diff=lfs merge=lfs -text
22
- *.pth filter=lfs diff=lfs merge=lfs -text
23
- *.rar filter=lfs diff=lfs merge=lfs -text
24
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
- *.tar.* filter=lfs diff=lfs merge=lfs -text
26
- *.tflite filter=lfs diff=lfs merge=lfs -text
27
- *.tgz filter=lfs diff=lfs merge=lfs -text
28
- *.wasm filter=lfs diff=lfs merge=lfs -text
29
- *.xz filter=lfs diff=lfs merge=lfs -text
30
- *.zip filter=lfs diff=lfs merge=lfs -text
31
- *.zst filter=lfs diff=lfs merge=lfs -text
32
- *tfevents* filter=lfs diff=lfs merge=lfs -text
33
- # Audio files - uncompressed
34
- *.pcm filter=lfs diff=lfs merge=lfs -text
35
- *.sam filter=lfs diff=lfs merge=lfs -text
36
- *.raw filter=lfs diff=lfs merge=lfs -text
37
- # Audio files - compressed
38
- *.aac filter=lfs diff=lfs merge=lfs -text
39
- *.flac filter=lfs diff=lfs merge=lfs -text
40
- *.mp3 filter=lfs diff=lfs merge=lfs -text
41
- *.ogg filter=lfs diff=lfs merge=lfs -text
42
- *.wav filter=lfs diff=lfs merge=lfs -text
43
- # Image files - uncompressed
44
- *.bmp filter=lfs diff=lfs merge=lfs -text
45
- *.gif filter=lfs diff=lfs merge=lfs -text
46
- *.png filter=lfs diff=lfs merge=lfs -text
47
- *.tiff filter=lfs diff=lfs merge=lfs -text
48
- # Image files - compressed
49
- *.jpg filter=lfs diff=lfs merge=lfs -text
50
- *.jpeg filter=lfs diff=lfs merge=lfs -text
51
- *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,41 +0,0 @@
1
- ---
2
- license: apache-2.0
3
- language:
4
- - de
5
- - en
6
- - es
7
- - fr
8
- - ja
9
- - zh
10
- - id
11
- - ar
12
- - hi
13
- - it
14
- - ms
15
- - pt
16
- multilinguality:
17
- - monolingual
18
- - multilingual
19
- size_categories:
20
- - 100K<n<1M
21
- - 1M<n<10M
22
- task_ids:
23
- - text-classification
24
- - sentiment-classification
25
- - sentiment-analysis
26
- task_categories:
27
- - text-classification
28
- - sentiment-analysis
29
- ---
30
-
31
- # Multilingual Sentiments Dataset
32
-
33
- A collection of multilingual sentiments datasets grouped into 3 classes -- positive, neutral, negative.
34
-
35
- Most multilingual sentiment datasets are either 2-class positive or negative, 5-class ratings of products reviews (e.g. Amazon multilingual dataset) or multiple classes of emotions. However, to an average person, sometimes positive, negative and neutral classes suffice and are more straightforward to perceive and annotate. Also, a positive/negative classification is too naive, most of the text in the world is actually neutral in sentiment. Furthermore, most multilingual sentiment datasets don't include Asian languages (e.g. Malay, Indonesian) and are dominated by Western languages (e.g. English, German).
36
-
37
- Git repo: https://github.com/tyqiangz/multilingual-sentiment-datasets
38
-
39
- ## Dataset Description
40
-
41
- - **Webpage:** https://github.com/tyqiangz/multilingual-sentiment-datasets
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
all/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d0ca9293893cb6d2587b1e02ea3798c76b91ea8555bde4ac779dc655da1ee0a
3
+ size 1463265
all/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d1c5d92eb082b494c8c9311a8f0d7662af75a7ae936382bf694f01c5d400bd1
3
+ size 37053403
all/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a76f174f0e90dd9db96d6c8ec0e8a0f096ed83a9629ce47b83f614a7c1aedf72
3
+ size 1264938
arabic/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93560342933259f2d4747b829edf7e050ba54cb866de1ef18e40245e9bdea3ca
3
+ size 75372
arabic/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bcdf6a3135b21ad209fd68c98d18c2a09cf1cc10dc128312d76365575177522
3
+ size 173343
arabic/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d85cbc11b4369971b3c33e08829db7c03d76c839d1b9317874ca105f7b38a59
3
+ size 32906
chinese/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e783a03e8f916c40945b07972ac6af0308fd5e2d5837a32f94defeede21130b
3
+ size 339317
chinese/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd92811f2e46b80ca37b50f4dc0d083efaf68a8c6e2acdbc08f7dd0bf8201c58
3
+ size 13460496
chinese/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67553ebd26bcf0b9028db3b4132711ae19c60d25adec20c88b3b7416a359d6d8
3
+ size 330285
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"id": {"description": "This sentence-level sentiment analysis dataset (Purwarianti and Crisdayanti, 2019)\nis a collection of comments and reviews in Indonesian obtained from multiple online\nplatforms. The text was crawled and then annotated by several Indonesian linguists\nto construct this dataset. There are three possible sentiments on the SmSA\ndataset: positive, negative, and neutral.", "citation": "@inproceedings{purwarianti2019improving,\n title={Improving Bi-LSTM Performance for Indonesian Sentiment Analysis Using Paragraph Vector},\n author={Ayu Purwarianti and Ida Ayu Putu Ari Crisdayanti},\n booktitle={Proceedings of the 2019 International Conference of Advanced Informatics: Concepts, Theory and Applications (ICAICTA)},\n pages={1--5},\n year={2019},\n organization={IEEE}\n}", "homepage": "https://www.indobenchmark.com/", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "id", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2209866, "num_examples": 11000, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 249625, "num_examples": 1260, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 77037, "num_examples": 500, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/indobenchmark/indonlu/master/dataset/smsa_doc-sentiment-prosa/train_preprocess.tsv": {"num_bytes": 2186718, "checksum": "50f38ceed9b31521bf1581e126620532cc9b790712938159a2cdcf6906977a9b"}, "https://raw.githubusercontent.com/indobenchmark/indonlu/master/dataset/smsa_doc-sentiment-prosa/valid_preprocess.tsv": {"num_bytes": 246974, "checksum": "6ab41ddc9d58a35086f05ebd2e209c74cb03d87d4f51d6abdfba674eafbefa74"}, "https://raw.githubusercontent.com/indobenchmark/indonlu/master/dataset/smsa_doc-sentiment-prosa/test_preprocess_masked_label.tsv": {"num_bytes": 75537, "checksum": "ecc239ad7a069774954843da50eba266398bab70d0370f74684bf1c107b64e70"}}, "download_size": 2509229, "post_processing_size": null, "dataset_size": 2536528, "size_in_bytes": 5045757}, "en": {"description": "English dataset", "citation": "", "homepage": "https://www.indobenchmark.com/", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "en", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 0, "num_examples": 0, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 0, "num_examples": 0, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 0, "num_examples": 0, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/en/train.tsv": {"num_bytes": 217706, "checksum": "e25dfcb4d3f5fc87caa0e39e0410638dadb1f96f5923b17faea81a0cf5fe66bc"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/en/valid.tsv": {"num_bytes": 38316, "checksum": "84a25a7fe69a000acfd3adbc4aa19da735eeb448970f7f34c9066d298e7ce077"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/en/test.tsv": {"num_bytes": 91275, "checksum": "07514cbb73a28c029e4d7a41fc61f3d9a6d1060412ab392e9ef696ba0a215bb0"}}, "download_size": 347297, "post_processing_size": null, "dataset_size": 0, "size_in_bytes": 347297}, "malay": {"description": "malay dataset.", "citation": "malay citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "malay", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 650770, "num_examples": 4687, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 141131, "num_examples": 1005, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 141423, "num_examples": 1005, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/malay/train.csv": {"num_bytes": 630189, "checksum": "bd27eaaa2b014119fea0ffb90bcb3138b456d4047664724fc65ac74426615721"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/malay/valid.csv": {"num_bytes": 136755, "checksum": "ee885dcd773f6eed7894519a6af355b40f0928dd2895ef7d95ea9e2a5b5cf403"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/malay/test.csv": {"num_bytes": 137015, "checksum": "32ad79fc03f957c7d8ae0253a5a3df8b59c7c2d92b5d529cd8fec192c10a79f6"}}, "download_size": 903959, "post_processing_size": null, "dataset_size": 933324, "size_in_bytes": 1837283}, "hindi": {"description": "hindi dataset.", "citation": "hindi citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "hindi", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 187901, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 34352, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 84056, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/hindi/train.csv": {"num_bytes": 178773, "checksum": "b4a6bc117a89851c8367408edb0400a1405df0c246de070f99005f8bcaaa8fd0"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/hindi/valid.csv": {"num_bytes": 32776, "checksum": "cf56ec1c0a9a1e7d55dcc60170f4ab873bbb8b856dd4e8466e9a7f9c4dfc429c"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/hindi/test.csv": {"num_bytes": 79726, "checksum": "16be62d7f2b57f396637aabda7db50a63c7cea90571c331035a30d8e927ee480"}}, "download_size": 291275, "post_processing_size": null, "dataset_size": 306309, "size_in_bytes": 597584}, "japanese": {"description": "japanese dataset.", "citation": "japanese citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "japanese", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 38611796, "num_examples": 120000, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 944465, "num_examples": 3000, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 957070, "num_examples": 3000, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/japanese/train.csv": {"num_bytes": 37973716, "checksum": "399be7d47ddcf732804d0a03a1ecce9b7fabf82cc70355f2b3873314b4acc79b"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/japanese/valid.csv": {"num_bytes": 928531, "checksum": "174892a3a91d55314044d85a56a5d6becc48138d4d74cacd4c5f20606b9b7c01"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/japanese/test.csv": {"num_bytes": 941124, "checksum": "2e219b35caa16d82b6e27bd6ec5660b9ffb70c6d4996606286c0fb10b1259501"}}, "download_size": 39843371, "post_processing_size": null, "dataset_size": 40513331, "size_in_bytes": 80356702}, "german": {"description": "german dataset.", "citation": "german citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "german", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 179639, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 30160, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 84383, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/german/train.csv": {"num_bytes": 171290, "checksum": "4c1a9f9c0454fc081ddd41fbac6bc883cf181bca7100d008591bdf2f2a82636c"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/german/valid.csv": {"num_bytes": 28655, "checksum": "346f76a36ea1bcc7342a91599bc245d42f162c14874bc2adf332e4a866ba8fde"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/german/test.csv": {"num_bytes": 80482, "checksum": "9310082f16b14849db4c1515c3d07760bf7b2d8e9fe2199783aeaf5ec50e63aa"}}, "download_size": 280427, "post_processing_size": null, "dataset_size": 294182, "size_in_bytes": 574609}, "italian": {"description": "italian dataset.", "citation": "italian citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "italian", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 222353, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 39540, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 107650, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/italian/train.csv": {"num_bytes": 214014, "checksum": "99fd4f68ab487cf642667f80f45bc9278923f633556deea27bcffdfb1448d107"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/italian/valid.csv": {"num_bytes": 38109, "checksum": "6e786c68de7bad9d1a39d7270c003ceedc76a764ca9e26f3ac8fd166dc6972e6"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/italian/test.csv": {"num_bytes": 103373, "checksum": "30c8b7a76a918e32e1bf616914f858e0c50810e8eb40da80cdf89f116fa8df8b"}}, "download_size": 355496, "post_processing_size": null, "dataset_size": 369543, "size_in_bytes": 725039}, "english": {"description": "english dataset.", "citation": "english citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "english", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 254824, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 44791, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 106864, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/english/train.csv": {"num_bytes": 247350, "checksum": "08abf3a6995d732dc1af70892fdcd6728fb27cac00e0dbdde7aa1ac015ff6056"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/english/valid.csv": {"num_bytes": 43524, "checksum": "32a36e15fed9d7bf8b857e6a48217715d9e38b001ab8c34824ce2dfc6709617c"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/english/test.csv": {"num_bytes": 102826, "checksum": "a7db671f797205d15a0570091e967f9a04c1fc071cb53b4c4197b79b287f8f37"}}, "download_size": 393700, "post_processing_size": null, "dataset_size": 406479, "size_in_bytes": 800179}, "portuguese": {"description": "portuguese dataset.", "citation": "portuguese citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "portuguese", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 192301, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 32709, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 90096, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/portuguese/train.csv": {"num_bytes": 183757, "checksum": "0bc3fbbe0533275a57a3b00a451aecd43ddc04d81f061445bc4cfd86739c4881"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/portuguese/valid.csv": {"num_bytes": 31177, "checksum": "7b84b6e1f51e3f91b5c37b9624969afe5142bc72c7e2c3623bb3112747749516"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/portuguese/test.csv": {"num_bytes": 86108, "checksum": "07b93e2157fcc96085ac8dde11b1a16d2968627b4002ec2513a4ba25897cf864"}}, "download_size": 301042, "post_processing_size": null, "dataset_size": 315106, "size_in_bytes": 616148}, "french": {"description": "french dataset.", "citation": "french citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "french", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 230006, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 40188, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 106596, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/french/train.csv": {"num_bytes": 221700, "checksum": "b05f8c635217bb53d12307437c2430e0dcbbf77080fb142a9c7c82bef001d695"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/french/valid.csv": {"num_bytes": 38761, "checksum": "f0603e275ecdeea2b272334b26eb2950a5d7f0a178567278ea95f8c65fb5e0e3"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/french/test.csv": {"num_bytes": 102656, "checksum": "6bee140ec5d006b64df9b9b435024f59aa30aeb6873b722d0044b28baa431fef"}}, "download_size": 363117, "post_processing_size": null, "dataset_size": 376790, "size_in_bytes": 739907}, "spanish": {"description": "spanish dataset.", "citation": "spanish citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "spanish", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 211108, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 37617, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 100902, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/spanish/train.csv": {"num_bytes": 202908, "checksum": "25ae7837279100e20f113a8f1c3ea64299a264dbeecc53611e80d1db48238269"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/spanish/valid.csv": {"num_bytes": 36207, "checksum": "83e85b71571dcec666c5c085fb751ea7882a42e3478a4fe8f48223fce120a357"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/spanish/test.csv": {"num_bytes": 97052, "checksum": "ab50d69bf7fc6e7b32d30f692a0b72edec6a5a6cc4553634ff1d9e993b1bf79d"}}, "download_size": 336167, "post_processing_size": null, "dataset_size": 349627, "size_in_bytes": 685794}, "chinese": {"description": "chinese dataset.", "citation": "chinese citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "chinese", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 22474086, "num_examples": 120000, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 555785, "num_examples": 3000, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 563522, "num_examples": 3000, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/chinese/train.csv": {"num_bytes": 21839388, "checksum": "4d847b1d300e52c3a67cc863727dfe24d7fc7c35350aa21767a9b5536af51911"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/chinese/valid.csv": {"num_bytes": 539915, "checksum": "c1b20e7b276ce73f9f477e5c0b0359aed101373098bbb9464e2dfe7ae514903f"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/chinese/test.csv": {"num_bytes": 547674, "checksum": "5e44c1335c36d5694dc50bff125d0a0c0d4b869968c06fa54ef43606767acce3"}}, "download_size": 22926977, "post_processing_size": null, "dataset_size": 23593393, "size_in_bytes": 46520370}, "all": {"description": "All datasets.", "citation": "All citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "language": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "all", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 69063358, "num_examples": 270399, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 2354116, "num_examples": 10857, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 2744290, "num_examples": 14465, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/train.csv": {"num_bytes": 66848321, "checksum": "52cdd6dc19de069ac6e32289c1b3d461d883631739b240bf80a703f8a8c0d228"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/valid.csv": {"num_bytes": 2268536, "checksum": "6118f6916a420d75a6eca13fcf237aaabdd657adb1e9cc357031b19e5ddaf959"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/test.csv": {"num_bytes": 2629789, "checksum": "d1b31a5c99ff63c459d86e81abca10f766ea94dfacee76a47b0fd0d0cbe2bbce"}}, "download_size": 71746646, "post_processing_size": null, "dataset_size": 74161764, "size_in_bytes": 145908410}, "indonesian": {"description": "indonesian dataset.", "citation": "indonesian citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "indonesian", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2396866, "num_examples": 11000, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 271045, "num_examples": 1260, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 85537, "num_examples": 500, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/indonesian/train.csv": {"num_bytes": 2354108, "checksum": "6a8af2355d9e03f262602308328106e9e04b77b7fe345adfe73093805a39e1f5"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/indonesian/valid.csv": {"num_bytes": 266180, "checksum": "092675412a96d4411401078b124fb31a415b7ce17e94b0abe6357e70c4bf3306"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/indonesian/test.csv": {"num_bytes": 83485, "checksum": "4bb9b30cb0d8a288809e1b33065a78d7543f8d38377cd8d9812503ca087d9726"}}, "download_size": 2703773, "post_processing_size": null, "dataset_size": 2753448, "size_in_bytes": 5457221}, "arabic": {"description": "arabic dataset.", "citation": "arabic citation", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["positive", "neutral", "negative"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multilingual-sentiments", "config_name": "arabic", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 337371, "num_examples": 1839, "dataset_name": "multilingual-sentiments"}, "validation": {"name": "validation", "num_bytes": 58784, "num_examples": 324, "dataset_name": "multilingual-sentiments"}, "test": {"name": "test", "num_bytes": 156326, "num_examples": 870, "dataset_name": "multilingual-sentiments"}}, "download_checksums": {"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/arabic/train.csv": {"num_bytes": 328177, "checksum": "de04c3f30a250a1eea2b099a38b47950ffdb497de48505720979128cdafdcb87"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/arabic/valid.csv": {"num_bytes": 57157, "checksum": "aa2bfcacc2bb628e86fa637a2322f2b716558a9d03731a3ebbcd304333025a38"}, "https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/arabic/test.csv": {"num_bytes": 151987, "checksum": "aadb117e75f886b99edcdcd4bfaad9ace433bbe758700038dc7806596c889373"}}, "download_size": 537321, "post_processing_size": null, "dataset_size": 552481, "size_in_bytes": 1089802}}
 
 
english/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddf107284bb28f5e3e595f94a0bede28a340241b1ec4643d56b2c2b6c7b640bd
3
+ size 65251
english/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fea95ccb70a5b333357de5d53dd2a0748e4435618c7cec81f198eafd79acf882
3
+ size 155944
english/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7be8f597678e2dae702ceba0fc110f8baeafc688cd77e484f19aff96f97e6db5
3
+ size 29613
french/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4f2ca7abcd98168bdbe55f5db082e9deaaad305020542482247e46b00c6f0e0
3
+ size 57364
french/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1eb6d3848e6d8c94e5685da298953a8ba01fb85343f83593e1b02a81efa6be9
3
+ size 126546
french/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bebf324e9ba442a861c5bce7c025f1cbba007685450e7eff704d2a0afc753d28
3
+ size 24763
german/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa467fdf2a6e935fb7e0a427d3a6249182cdee68dc7378a48ea3afbae661f86d
3
+ size 54493
german/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de66e097fe6cfe086a29b30f56c12e123c208f60458d8911c7c19e3d67bb22c8
3
+ size 114878
german/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fb4850a045e11fd7a01739e3f403c4e0b232d4e503d17d8f317c80e3d7d281e
3
+ size 21111
hindi/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3e4bcbe96537cf9cab0262c6bb020f3f04f639fb05e7cf69b8aa24e661bc2eb
3
+ size 52270
hindi/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25218ab86eb3c601d33621cbd6671f71de219c51c8860b36e289d0bb30ce0a13
3
+ size 117264
hindi/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:109d98e47449d1e4f7a143ca78d148db8d3c435bc7c973790220789f8bf5a24d
3
+ size 23439
indonesian/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f4180b55632f08f8e35aa89aa5422ac152d09e1f1576fada98436eff2a01f3c
3
+ size 45604
indonesian/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8328b94a5650ab9bd3810427274f4a541c7294b2c4b8b1fb89b66c69f5fd500
3
+ size 1280911
indonesian/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5be65d250fd8dac0d459e3dcfdba3068cb39ba66005fb6d33bbcbd6e06328687
3
+ size 148663
italian/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e0c6a142889bf2defa1db8d0edff6e29dee0a3c985020e11aa971d1dc89eef3
3
+ size 58040
italian/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3835a6547687ddde3b6e9a4751ae7847ee424883de7f70af7c1d64ac9db90304
3
+ size 126796
italian/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13edcc8097b7fc902be9db0e5904337f5eabeee141065a2f2a3a030d2ffb0c90
3
+ size 25117
japanese/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae938abea36c5573ac4fadf7b304b24f937f76506e8ca7a66cda2446e9bbef57
3
+ size 517223
japanese/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:051fd38d93d4d89d7ea0be1b5e5439a04787e8526d39788d00d45ff7858cf0aa
3
+ size 20790510
japanese/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89c24d0942955e88dca97a564d5015b1fe97193d347a206aa1ab4575ab6a2561
3
+ size 507145
malay/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf35a6d059891ca25d24dd7628ec7364733b0a032979f9f0721727eea00701ed
3
+ size 89533
malay/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b47b54406520ca5533db398d55c4ba93f93a98bce59e72015314e7da52c888a
3
+ size 397767
malay/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a49aee2a7601722ca49e751b52e53bbcf628528103b60091f7f191bafd76c2a
3
+ size 89152
multilingual-sentiments.py DELETED
@@ -1,165 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
-
17
- import csv
18
- import textwrap
19
- import pandas as pd
20
-
21
- import datasets
22
-
23
- import pandas as pd
24
-
25
- LANGUAGES = ['malay', 'hindi', 'japanese', 'german',
26
- 'italian', 'english', 'portuguese', 'french',
27
- 'spanish', 'chinese', 'indonesian', 'arabic'
28
- ]
29
-
30
-
31
- class MultilingualSentimentsConfig(datasets.BuilderConfig):
32
- """BuilderConfig for Multilingual Sentiments"""
33
-
34
- def __init__(
35
- self,
36
- text_features,
37
- label_column,
38
- label_classes,
39
- train_url,
40
- valid_url,
41
- test_url,
42
- citation,
43
- **kwargs,
44
- ):
45
- """BuilderConfig for Multilingual Sentiments.
46
-
47
- Args:
48
- text_features: `dict[string, string]`, map from the name of the feature
49
- dict for each text field to the name of the column in the txt/csv/tsv file
50
- label_column: `string`, name of the column in the txt/csv/tsv file corresponding
51
- to the label
52
- label_classes: `list[string]`, the list of classes if the label is categorical
53
- train_url: `string`, url to train file from
54
- valid_url: `string`, url to valid file from
55
- test_url: `string`, url to test file from
56
- citation: `string`, citation for the data set
57
- **kwargs: keyword arguments forwarded to super.
58
- """
59
- super(MultilingualSentimentsConfig, self).__init__(
60
- version=datasets.Version("1.0.0", ""), **kwargs)
61
- self.text_features = text_features
62
- self.label_column = label_column
63
- self.label_classes = label_classes
64
- self.train_url = train_url
65
- self.valid_url = valid_url
66
- self.test_url = test_url
67
- self.citation = citation
68
-
69
-
70
- class MultilingualSentiments(datasets.GeneratorBasedBuilder):
71
- """Multilingual Sentiments benchmark"""
72
-
73
- BUILDER_CONFIGS = []
74
-
75
- BUILDER_CONFIGS.append(
76
- MultilingualSentimentsConfig(
77
- name="all",
78
- description=textwrap.dedent(
79
- f"""\
80
- All datasets."""
81
- ),
82
- text_features={"text": "text", "source": "source", "language": "language"},
83
- label_classes=["positive", "neutral", "negative"],
84
- label_column="label",
85
- train_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/train.csv",
86
- valid_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/valid.csv",
87
- test_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/all/test.csv",
88
- citation=textwrap.dedent(
89
- f"""\
90
- All citation"""
91
- ),
92
- ),
93
- )
94
-
95
- for lang in LANGUAGES:
96
- BUILDER_CONFIGS.append(
97
- MultilingualSentimentsConfig(
98
- name=lang,
99
- description=textwrap.dedent(
100
- f"""\
101
- {lang} dataset."""
102
- ),
103
- text_features={"text": "text", "source": "source"},
104
- label_classes=["positive", "neutral", "negative"],
105
- label_column="label",
106
- train_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/{lang}/train.csv",
107
- valid_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/{lang}/valid.csv",
108
- test_url=f"https://raw.githubusercontent.com/tyqiangz/multilingual-sentiment-datasets/main/data/{lang}/test.csv",
109
- citation=textwrap.dedent(
110
- f"""\
111
- {lang} citation"""
112
- ),
113
- ),
114
- )
115
-
116
- def _info(self):
117
- features = {text_feature: datasets.Value(
118
- "string") for text_feature in self.config.text_features}
119
-
120
- features["label"] = datasets.features.ClassLabel(
121
- names=self.config.label_classes)
122
-
123
- return datasets.DatasetInfo(
124
- description=self.config.description,
125
- features=datasets.Features(features),
126
- citation=self.config.citation,
127
- )
128
-
129
- def _split_generators(self, dl_manager):
130
- """Returns SplitGenerators."""
131
- train_path = dl_manager.download_and_extract(self.config.train_url)
132
- valid_path = dl_manager.download_and_extract(self.config.valid_url)
133
- test_path = dl_manager.download_and_extract(self.config.test_url)
134
- return [
135
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={
136
- "filepath": train_path}),
137
- datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={
138
- "filepath": valid_path}),
139
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={
140
- "filepath": test_path}),
141
- ]
142
-
143
- def _generate_examples(self, filepath):
144
-
145
- df = pd.read_csv(filepath)
146
-
147
- print('-'*100)
148
- print(df.head())
149
- print('-'*100)
150
-
151
- for id_, row in df.iterrows():
152
- if self.config.name != "all":
153
- text = row["text"]
154
- label = row["label"]
155
- source = row["source"]
156
-
157
- yield id_, {"text": text, "label": label, "source": source}
158
-
159
- else:
160
- text = row["text"]
161
- label = row["label"]
162
- source = row["source"]
163
- language = row["language"]
164
-
165
- yield id_, {"text": text, "label": label, "source": source, "language": language}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
portuguese/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a446116cb0d1e1109579e12e7de61edb2973d4ac9689503cd43aa7385764dcf2
3
+ size 47838
portuguese/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d73eeaee52aa660a0e80cc5eb9645a29cbf7b65cdff6d7c285f8a183b3b15372
3
+ size 102084
portuguese/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5033505138c3b0f1944cf2ccf39ddb1687d71ba7b6e32571108e274e3ebecd49
3
+ size 19508
spanish/multilingual-sentiments-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a917489278a3b9fbc5c690f539ff883394aa44c99272a59194d80c5d0f49de22
3
+ size 58504
spanish/multilingual-sentiments-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6b600cfb792123a0bd55557b8baf125cd0f11ae4b41f5708312db0f33b97f32
3
+ size 120287
spanish/multilingual-sentiments-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17bc911ef3397b14b0f295d63f2fed2e73e3604490419e06690d19c53906477b
3
+ size 24067