Various Edits
Browse files- Naija-Stopwords.py +9 -9
- dataset_infos.json +1 -1
Naija-Stopwords.py
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 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 |
|
| 18 |
|
|
@@ -56,8 +56,8 @@ import datasets
|
|
| 56 |
|
| 57 |
LANGUAGES = ['hausa', 'igbo', 'yoruba', 'nigerian_pidgin']
|
| 58 |
|
| 59 |
-
class
|
| 60 |
-
"""BuilderConfig for
|
| 61 |
|
| 62 |
def __init__(
|
| 63 |
self,
|
|
@@ -66,7 +66,7 @@ class NaijaSentiConfig(datasets.BuilderConfig):
|
|
| 66 |
citation,
|
| 67 |
**kwargs,
|
| 68 |
):
|
| 69 |
-
"""BuilderConfig for
|
| 70 |
|
| 71 |
Args:
|
| 72 |
text_features: `dict[string]`, map from the name of the feature
|
|
@@ -80,26 +80,26 @@ class NaijaSentiConfig(datasets.BuilderConfig):
|
|
| 80 |
citation: `string`, citation for the data set
|
| 81 |
**kwargs: keyword arguments forwarded to super.
|
| 82 |
"""
|
| 83 |
-
super(
|
| 84 |
self.text_features = text_features
|
| 85 |
self.stopwords_url = stopwords_url
|
| 86 |
self.citation = citation
|
| 87 |
|
| 88 |
|
| 89 |
-
class
|
| 90 |
-
"""
|
| 91 |
|
| 92 |
BUILDER_CONFIGS = []
|
| 93 |
|
| 94 |
for lang in LANGUAGES:
|
| 95 |
BUILDER_CONFIGS.append(
|
| 96 |
-
|
| 97 |
name=lang,
|
| 98 |
description=textwrap.dedent(
|
| 99 |
f"""{_DESCRIPTION}"""
|
| 100 |
),
|
| 101 |
text_features={"word": "word"},
|
| 102 |
-
stopwords_url=f"https://raw.githubusercontent.com/hausanlp/
|
| 103 |
citation=textwrap.dedent(
|
| 104 |
f"""{_CITATION}"""
|
| 105 |
),
|
|
|
|
| 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 |
+
"""NaijaStopwords: A Nigerian Twitter Sentiment Corpus for Multilingual Sentiment Analysis"""
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
| 56 |
|
| 57 |
LANGUAGES = ['hausa', 'igbo', 'yoruba', 'nigerian_pidgin']
|
| 58 |
|
| 59 |
+
class NaijaStopwordsConfig(datasets.BuilderConfig):
|
| 60 |
+
"""BuilderConfig for NaijaStopwords"""
|
| 61 |
|
| 62 |
def __init__(
|
| 63 |
self,
|
|
|
|
| 66 |
citation,
|
| 67 |
**kwargs,
|
| 68 |
):
|
| 69 |
+
"""BuilderConfig for NaijaStopwords.
|
| 70 |
|
| 71 |
Args:
|
| 72 |
text_features: `dict[string]`, map from the name of the feature
|
|
|
|
| 80 |
citation: `string`, citation for the data set
|
| 81 |
**kwargs: keyword arguments forwarded to super.
|
| 82 |
"""
|
| 83 |
+
super(NaijaStopwordsConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
| 84 |
self.text_features = text_features
|
| 85 |
self.stopwords_url = stopwords_url
|
| 86 |
self.citation = citation
|
| 87 |
|
| 88 |
|
| 89 |
+
class NaijaStopwords(datasets.GeneratorBasedBuilder):
|
| 90 |
+
"""NaijaStopwords benchmark"""
|
| 91 |
|
| 92 |
BUILDER_CONFIGS = []
|
| 93 |
|
| 94 |
for lang in LANGUAGES:
|
| 95 |
BUILDER_CONFIGS.append(
|
| 96 |
+
NaijaStopwordsConfig(
|
| 97 |
name=lang,
|
| 98 |
description=textwrap.dedent(
|
| 99 |
f"""{_DESCRIPTION}"""
|
| 100 |
),
|
| 101 |
text_features={"word": "word"},
|
| 102 |
+
stopwords_url=f"https://raw.githubusercontent.com/hausanlp/NaijaStopwords/main/data/stopwords/{lang}_stopwords.csv",
|
| 103 |
citation=textwrap.dedent(
|
| 104 |
f"""{_CITATION}"""
|
| 105 |
),
|
dataset_infos.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
}
|
| 13 |
},
|
| 14 |
"post_processed": null,
|
| 15 |
-
"builder_name": "
|
| 16 |
"config_name": "default",
|
| 17 |
"version": {
|
| 18 |
"version_str": "0.0.0",
|
|
|
|
| 12 |
}
|
| 13 |
},
|
| 14 |
"post_processed": null,
|
| 15 |
+
"builder_name": "NaijaStopwords",
|
| 16 |
"config_name": "default",
|
| 17 |
"version": {
|
| 18 |
"version_str": "0.0.0",
|