Datasets:
Several
Browse files- Naija-Lexicons.py +9 -9
- dataset_infos.json +0 -56
Naija-Lexicons.py
CHANGED
@@ -63,8 +63,8 @@ class NaijaLexiconsConfig(datasets.BuilderConfig):
|
|
63 |
def __init__(
|
64 |
self,
|
65 |
text_features,
|
66 |
-
|
67 |
-
|
68 |
label_column,
|
69 |
label_classes,
|
70 |
hau_url,
|
@@ -89,8 +89,8 @@ class NaijaLexiconsConfig(datasets.BuilderConfig):
|
|
89 |
"""
|
90 |
super(NaijaLexiconsConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
91 |
self.text_features = text_features
|
92 |
-
self.
|
93 |
-
self.
|
94 |
self.label_column = label_column
|
95 |
self.label_classes = label_classes
|
96 |
self.hau_url = hau_url
|
@@ -113,8 +113,8 @@ class NaijaLexicons(datasets.GeneratorBasedBuilder):
|
|
113 |
f"""{_DESCRIPTION}"""
|
114 |
),
|
115 |
text_features={"word": "word"},
|
116 |
-
|
117 |
-
|
118 |
label_classes=["POSITIVE", "NEGATIVE"],
|
119 |
label_column="label",
|
120 |
hau_url=f"https://raw.githubusercontent.com/hausanlp/NaijaSenti/main/data/sentiment-lexicons/{t}/hausa/mixed.csv",
|
@@ -133,8 +133,8 @@ class NaijaLexicons(datasets.GeneratorBasedBuilder):
|
|
133 |
f"""{_DESCRIPTION}"""
|
134 |
),
|
135 |
text_features={"word": "word"},
|
136 |
-
|
137 |
-
|
138 |
label_classes=["POSITIVE", "NEGATIVE"],
|
139 |
label_column="label",
|
140 |
hau_url=f"https://raw.githubusercontent.com/hausanlp/NaijaSenti/main/data/sentiment-lexicons/{t}/hausa/mixed.csv",
|
@@ -182,7 +182,7 @@ class NaijaLexicons(datasets.GeneratorBasedBuilder):
|
|
182 |
machine = row['machine']
|
183 |
human = row['human']
|
184 |
|
185 |
-
yield id_, {"word": word, '
|
186 |
else:
|
187 |
for id_, row in df.iterrows():
|
188 |
word = row["word"]
|
|
|
63 |
def __init__(
|
64 |
self,
|
65 |
text_features,
|
66 |
+
machine_translation,
|
67 |
+
human_translation,
|
68 |
label_column,
|
69 |
label_classes,
|
70 |
hau_url,
|
|
|
89 |
"""
|
90 |
super(NaijaLexiconsConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
91 |
self.text_features = text_features
|
92 |
+
self.machine_translation = machine_translation
|
93 |
+
self.human_translation = human_translation
|
94 |
self.label_column = label_column
|
95 |
self.label_classes = label_classes
|
96 |
self.hau_url = hau_url
|
|
|
113 |
f"""{_DESCRIPTION}"""
|
114 |
),
|
115 |
text_features={"word": "word"},
|
116 |
+
machine_translation={'machine': 'machine_translation'},
|
117 |
+
human_translation={'human': 'human_translation'},
|
118 |
label_classes=["POSITIVE", "NEGATIVE"],
|
119 |
label_column="label",
|
120 |
hau_url=f"https://raw.githubusercontent.com/hausanlp/NaijaSenti/main/data/sentiment-lexicons/{t}/hausa/mixed.csv",
|
|
|
133 |
f"""{_DESCRIPTION}"""
|
134 |
),
|
135 |
text_features={"word": "word"},
|
136 |
+
machine_translation={},
|
137 |
+
human_translation={},
|
138 |
label_classes=["POSITIVE", "NEGATIVE"],
|
139 |
label_column="label",
|
140 |
hau_url=f"https://raw.githubusercontent.com/hausanlp/NaijaSenti/main/data/sentiment-lexicons/{t}/hausa/mixed.csv",
|
|
|
182 |
machine = row['machine']
|
183 |
human = row['human']
|
184 |
|
185 |
+
yield id_, {"word": word, 'machine_translation': machine, 'human_translation': human, "label": label}
|
186 |
else:
|
187 |
for id_, row in df.iterrows():
|
188 |
word = row["word"]
|
dataset_infos.json
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"default": {
|
3 |
-
"description": "Naija-Lexicons is a part of the Naija-Senti project. It is a list of collected stopwords from the four most widely spoken languages in Nigeria — Hausa, Igbo, Nigerian-Pidgin, and Yorùbá.\n",
|
4 |
-
"citation": " ",
|
5 |
-
"homepage": "https://github.com/hausanlp/NaijaSenti",
|
6 |
-
"license": "",
|
7 |
-
"features": {
|
8 |
-
"word": {
|
9 |
-
"dtype": "string",
|
10 |
-
"id": null,
|
11 |
-
"_type": "Value"
|
12 |
-
},
|
13 |
-
"label": {
|
14 |
-
"num_classes": 2,
|
15 |
-
"names": [
|
16 |
-
"POSITIVE",
|
17 |
-
"NEGATIVE"
|
18 |
-
],
|
19 |
-
"names_file": null,
|
20 |
-
"id": null,
|
21 |
-
"_type": "ClassLabel"
|
22 |
-
}
|
23 |
-
},
|
24 |
-
"post_processed": null,
|
25 |
-
"supervised_keys": {
|
26 |
-
"input": "word",
|
27 |
-
"output": "label"
|
28 |
-
},
|
29 |
-
"task_templates": [
|
30 |
-
{
|
31 |
-
"task": "text-classification",
|
32 |
-
"text_column": "word",
|
33 |
-
"label_column": "label",
|
34 |
-
"labels": [
|
35 |
-
"positive",
|
36 |
-
"negative",
|
37 |
-
"neutral"
|
38 |
-
]
|
39 |
-
}
|
40 |
-
],
|
41 |
-
"builder_name": "NaijaLexicons",
|
42 |
-
"config_name": "default",
|
43 |
-
"version": {
|
44 |
-
"version_str": "0.0.0",
|
45 |
-
"description": null,
|
46 |
-
"major": 0,
|
47 |
-
"minor": 0,
|
48 |
-
"patch": 0
|
49 |
-
|
50 |
-
},
|
51 |
-
"download_size": 2069616,
|
52 |
-
"post_processing_size": null,
|
53 |
-
"dataset_size": 2173417,
|
54 |
-
"size_in_bytes": 4243033
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|