Datasets:

Modalities:
Text
ArXiv:
Libraries:
Datasets
License:
parquet-converter commited on
Commit
71976cb
1 Parent(s): b18e3ae

Update parquet files

Browse files
NusaX-senti.py DELETED
@@ -1,116 +0,0 @@
1
- from pathlib import Path
2
- from typing import Dict, List, Tuple
3
-
4
- import datasets
5
- import pandas as pd
6
-
7
- _LOCAL = False
8
-
9
- _LANGUAGES = ["ind", "ace", "ban", "bjn", "bbc", "bug", "jav", "mad", "min", "nij", "sun", "eng"] # We follow ISO639-3 language code (https://iso639-3.sil.org/code_tables/639/data)
10
-
11
- _CITATION = """\
12
- @misc{winata2022nusax,
13
- title={NusaX: Multilingual Parallel Sentiment Dataset for 10 Indonesian Local Languages},
14
- author={Winata, Genta Indra and Aji, Alham Fikri and Cahyawijaya,
15
- Samuel and Mahendra, Rahmad and Koto, Fajri and Romadhony,
16
- Ade and Kurniawan, Kemal and Moeljadi, David and Prasojo,
17
- Radityo Eko and Fung, Pascale and Baldwin, Timothy and Lau,
18
- Jey Han and Sennrich, Rico and Ruder, Sebastian},
19
- year={2022},
20
- eprint={2205.15960},
21
- archivePrefix={arXiv},
22
- primaryClass={cs.CL}
23
- }
24
- """
25
-
26
- _DESCRIPTION = """\
27
- NusaX is a high-quality multilingual parallel corpus that covers 12 languages, Indonesian, English, and 10 Indonesian local languages, namely Acehnese, Balinese, Banjarese, Buginese, Madurese, Minangkabau, Javanese, Ngaju, Sundanese, and Toba Batak.
28
- NusaX-Senti is a 3-labels (positive, neutral, negative) sentiment analysis dataset for 10 Indonesian local languages + Indonesian and English.
29
- """
30
-
31
- _HOMEPAGE = "https://github.com/IndoNLP/nusax/tree/main/datasets/sentiment"
32
-
33
- _LICENSE = "Creative Commons Attribution Share-Alike 4.0 International"
34
-
35
- _SOURCE_VERSION = "1.0.0"
36
-
37
- _URLS = {
38
- "train": "https://raw.githubusercontent.com/IndoNLP/nusax/main/datasets/sentiment/{lang}/train.csv",
39
- "validation": "https://raw.githubusercontent.com/IndoNLP/nusax/main/datasets/sentiment/{lang}/valid.csv",
40
- "test": "https://raw.githubusercontent.com/IndoNLP/nusax/main/datasets/sentiment/{lang}/test.csv",
41
- }
42
-
43
- LANGUAGES_MAP = {
44
- "ace": "acehnese",
45
- "ban": "balinese",
46
- "bjn": "banjarese",
47
- "bug": "buginese",
48
- "eng": "english",
49
- "ind": "indonesian",
50
- "jav": "javanese",
51
- "mad": "madurese",
52
- "min": "minangkabau",
53
- "nij": "ngaju",
54
- "sun": "sundanese",
55
- "bbc": "toba_batak",
56
- }
57
-
58
-
59
- class NusaXSenti(datasets.GeneratorBasedBuilder):
60
- """NusaX-Senti is a 3-labels (positive, neutral, negative) sentiment analysis dataset for 10 Indonesian local languages + Indonesian and English."""
61
-
62
- BUILDER_CONFIGS = [
63
- datasets.BuilderConfig(
64
- name = lang,
65
- version = _SOURCE_VERSION,
66
- description = f"NusaX-Senti: Sentiment analysis dataset for {lang}")
67
- for lang in LANGUAGES_MAP]
68
-
69
- DEFAULT_CONFIG_NAME = "ind"
70
-
71
- def _info(self) -> datasets.DatasetInfo:
72
- features = datasets.Features(
73
- {
74
- "id": datasets.Value("string"),
75
- "text": datasets.Value("string"),
76
- "lang": datasets.Value("string"),
77
- "label": datasets.Value("string"),
78
- }
79
- )
80
-
81
- return datasets.DatasetInfo(
82
- description=_DESCRIPTION,
83
- features=features,
84
- homepage=_HOMEPAGE,
85
- license=_LICENSE,
86
- citation=_CITATION,
87
- )
88
-
89
- def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
90
- """Returns SplitGenerators."""
91
- lang = self.config.name
92
- train_csv_path = Path(dl_manager.download_and_extract(_URLS["train"].format(lang=LANGUAGES_MAP[lang])))
93
- validation_csv_path = Path(dl_manager.download_and_extract(_URLS["validation"].format(lang=LANGUAGES_MAP[lang])))
94
- test_csv_path = Path(dl_manager.download_and_extract(_URLS["test"].format(lang=LANGUAGES_MAP[lang])))
95
-
96
- return [
97
- datasets.SplitGenerator(
98
- name=datasets.Split.TRAIN,
99
- gen_kwargs={"filepath": train_csv_path},
100
- ),
101
- datasets.SplitGenerator(
102
- name=datasets.Split.VALIDATION,
103
- gen_kwargs={"filepath": validation_csv_path},
104
- ),
105
- datasets.SplitGenerator(
106
- name=datasets.Split.TEST,
107
- gen_kwargs={"filepath": test_csv_path},
108
- ),
109
- ]
110
-
111
- def _generate_examples(self, filepath: Path) -> Tuple[int, Dict]:
112
- df = pd.read_csv(filepath).reset_index()
113
-
114
- for row in df.itertuples():
115
- ex = {"id": str(row.id), "text": row.text, "label": row.label, "lang": self.config.name}
116
- yield row.id, ex
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ace/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe8f5e23f1b8bbe901c0da7c781b1bef21cb837a35a2a361aec4769571f0c441
3
+ size 43592
ace/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6041eaaf2ca5eef085f234873d112bc31365ce49eb381fc442a7a34c9c6823ad
3
+ size 54193
ace/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d42b98a1f363975618483e3cafc77024fcfa26a7dc0dfdc569c25042ae1997c0
3
+ size 13900
ban/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdcbc9cc875a6ed8b1b706aabae76051a6cf6e0caf9ef384d3d525bb34825055
3
+ size 45893
ban/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58046d2950cd7b7b8e6d32f4f78a8e7f4397f69de6f8bcc9789eabe2ab070072
3
+ size 56010
ban/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7188b23288f01a3b392ac670113ce672775a4f094957038300c18050c070f43d
3
+ size 14521
bbc/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da7d1622f23ceef753a8403ab334703729fffce2e7000dce869364751368e005
3
+ size 45130
bbc/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c20abaa4bd4d66306fe28b1b143fd69d6fa2706bbde038e5bc80caff407df954
3
+ size 55904
bbc/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee705dc110aaeb7f410db00561bb9be250557a17bbd721097ce3e94e126ca219
3
+ size 13692
bjn/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0e47c6740082de6df3f8bd9e95ec61648e59c8beb4ab63e4d3b6eecc79c0f21
3
+ size 43946
bjn/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdc48e49a4313e61732e2dd7f672144fe28a6a41d8024f2e098b354e38462fd7
3
+ size 54424
bjn/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90b6b97a93a3846796aa5d0cc060c30ddc38265d5f98b7e02319d460327b89e2
3
+ size 13607
bug/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ff81da23d5db2f44b27b9a0e9e3159a3c584695dac9ce8ad08179bfc55c7cdb
3
+ size 46979
bug/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc08e78bf6a66018d95aa29434e932e21fcf643f14730d06adbd30cc3eb3fe49
3
+ size 58010
bug/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02583a2d568b22aa681c06f2f082255ab70596ebcdd86f95d663fcfe3db9dfc3
3
+ size 13744
eng/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1e580612e93ee24e8149c47f401a7ab2eda1043421aecec5c02053ebe90e0cc
3
+ size 46438
eng/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a67e7084d3e5f0e46c99c233bf6eff7a354731ad23708fca27d80afd0318ec2d
3
+ size 58753
eng/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18f966ea20122a1a189473545b55083be5d3ba4946e258d36703ca3408960b3c
3
+ size 15276
ind/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:558c5f0258014d4e5b1952f352c83741278a7c2885e1d0a88a119a5518fe5f8d
3
+ size 43515
ind/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b699b719da09fb8d5421e7d76d2c42eb48d8bbd70fdf1bd2b1f7dfb21ec836f
3
+ size 54101
ind/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:591cba54ee505b3efdd9e3f666e8a0af94f07bfb4c2141e15de2a8927068eb2a
3
+ size 13981
jav/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8abb711a16cdbdb886b486a19f759e4a54f89225dccecc02a64c47f1f400a54e
3
+ size 43814
jav/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ecab50a5f942ff3272e3d1eab5fecd00711a17dc442f6740036df2f87d2df39
3
+ size 54734
jav/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5b5a04462e81b9c6654b0a4ffb103b0c79508b5eee6df5bde231933f21ae5bf
3
+ size 13640
mad/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0197819e8835564e7000f1dd6910ba6ffb921b1138440904c5269a0214e7dbc6
3
+ size 44947
mad/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d1f87e842acbc64759139f70af3cca78510f8d18aacc2e1c1b095a9a274a0f0
3
+ size 55857
mad/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17783619af37aa896707be36e58c79b6a0cd83060409075ed71f27072426cc50
3
+ size 14567
min/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44f51ea9a8abef0be2ccf021d1d4dfd9c1ec7057e1bf9184e3952c9994d2571a
3
+ size 44476
min/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23d866f113786d2c4cf8641ebe14b7ff21eda47d568fb6a2eddbf0e5a9cd9ae0
3
+ size 54391
min/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e19d684d9c78ae905299c6a6c0336e06a70df36a7a60b2e4b993cec94340c30
3
+ size 13860
nij/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e356276a8748b4f336bce31a671c62535f5d4c17d9cece955797c436aee2b29c
3
+ size 44069
nij/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ecf9958c9fb856015feb1cd983c29ae0b76ffafe6375d0eff850b29500eb6a36
3
+ size 53381
nij/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40b02a46ea40799f9b3107f5fe3d0602a912a076fb5049c69000e7f84fbc1f50
3
+ size 13266
sun/nusa_x-senti-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84fef28f6b0badeda106ca8c0aec35fe3884ecf8470d7d506944535c35d663d0
3
+ size 45158
sun/nusa_x-senti-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8e37f1cc52a4d36a2aeb50916f4111da5f96131cd3744587601912684c09557
3
+ size 54765
sun/nusa_x-senti-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f432418baa960c9f89e766d47fc8a36f8c84d9cd5f9a07a6c5e30c4c320f968
3
+ size 13823