Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,134 +1,127 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: togethercomputer/gpt-oss-20b-bf16
|
| 3 |
-
library_name: peft
|
| 4 |
-
license: cc-by-4.0
|
| 5 |
language:
|
| 6 |
- ha
|
| 7 |
- yo
|
| 8 |
- sw
|
|
|
|
|
|
|
|
|
|
| 9 |
tags:
|
| 10 |
- sentiment-analysis
|
| 11 |
- african-languages
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
| 14 |
- autoscientist-challenge
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# African Languages Sentiment
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
>
|
| 25 |
-
>
|
| 26 |
-
> -
|
| 27 |
-
> (AutoScientist's "Adaptive Data" step rewrote/expanded the original
|
| 28 |
-
> labeled examples into `enhanced_prompt` / `enhanced_completion` pairs
|
| 29 |
-
> with synthetic reasoning traces). It was **not** trained directly on the
|
| 30 |
-
> raw human-annotated dataset as-is.
|
| 31 |
-
> - The **evaluation numbers below come from AutoScientist's internal
|
| 32 |
-
> judge-based quality and win-rate metrics**, not standard classification
|
| 33 |
-
> accuracy, precision, recall, or F1. Treat "Grade" and "Win Rate" as
|
| 34 |
-
> AutoScientist's own scoring rubric, not an external, independently
|
| 35 |
-
> reproducible benchmark.
|
| 36 |
-
> - **General-capability win rate slightly regressed** after adaptation
|
| 37 |
-
> (52 → 48, see below) — this model appears to trade a small amount of
|
| 38 |
-
> general capability for task-specific sentiment performance. That's a
|
| 39 |
-
> normal fine-tuning tradeoff, not a bug, but you should know it's there.
|
| 40 |
-
> - This adapter has **not been independently evaluated against the
|
| 41 |
-
> `Davlan/afrisenti-twitter-sentiment-afroxlmr-large` baseline** on a
|
| 42 |
-
> standard accuracy/macro-F1 metric. If you need that comparison, run it
|
| 43 |
-
> yourself before drawing conclusions about relative performance.
|
| 44 |
>
|
| 45 |
-
>
|
| 46 |
-
>
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
- **
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
-
|
| 73 |
-
-
|
| 74 |
-
|
| 75 |
-
-
|
| 76 |
-
-
|
| 77 |
-
|
| 78 |
-
##
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
| 85 |
-
|
|
| 86 |
-
|
|
| 87 |
-
|
|
| 88 |
-
|
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
## Intended Use
|
| 98 |
-
|
| 99 |
-
Sentiment classification (positive/negative/neutral) for short-form text in
|
| 100 |
-
Hausa, Yorùbá, or Swahili, primarily for research and benchmarking purposes
|
| 101 |
-
within the AutoScientist Challenge. Not validated for production deployment.
|
| 102 |
-
|
| 103 |
-
## How to Use
|
| 104 |
-
|
| 105 |
-
```python
|
| 106 |
-
from peft import PeftModel
|
| 107 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 108 |
-
|
| 109 |
-
base_model = AutoModelForCausalLM.from_pretrained("togethercomputer/gpt-oss-20b-bf16")
|
| 110 |
-
model = PeftModel.from_pretrained(base_model, "gospelgit/African-Languages-Sentiment-Classifier")
|
| 111 |
-
tokenizer = AutoTokenizer.from_pretrained("gospelgit/African-Languages-Sentiment-Classifier")
|
| 112 |
-
|
| 113 |
-
prompt = "Classify the sentiment of this text as positive, negative, or neutral: <your text here>"
|
| 114 |
-
inputs = tokenizer(prompt, return_tensors="pt")
|
| 115 |
-
output = model.generate(**inputs, max_new_tokens=5)
|
| 116 |
-
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 117 |
-
```
|
| 118 |
|
| 119 |
## Limitations
|
| 120 |
|
| 121 |
-
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
## Citation
|
| 132 |
|
| 133 |
-
If you use this
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- ha
|
| 4 |
- yo
|
| 5 |
- sw
|
| 6 |
+
license: cc-by-4.0
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-classification
|
| 9 |
tags:
|
| 10 |
- sentiment-analysis
|
| 11 |
- african-languages
|
| 12 |
+
- hausa
|
| 13 |
+
- yoruba
|
| 14 |
+
- swahili
|
| 15 |
- autoscientist-challenge
|
| 16 |
+
size_categories:
|
| 17 |
+
- 10K<n<100K
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# African Languages Sentiment Dataset (Hausa, Yorùbá, Swahili)
|
| 21 |
|
| 22 |
+
A stitched multi-source sentiment classification dataset combining three
|
| 23 |
+
independently collected sentiment corpora for Hausa, Yorùbá, and Swahili,
|
| 24 |
+
built for the [Adaption Labs AutoScientist Challenge](https://adaptionlabs.ai/blog/autoscientist-challenge)
|
| 25 |
+
(Language category).
|
| 26 |
+
|
| 27 |
+
> **Companion model**: fine-tuned weights trained on the adapted version of this dataset via
|
| 28 |
+
> AutoScientist are released separately at
|
| 29 |
+
> `gospelgit/African-Languages-Sentiment-Classifier`((https://huggingface.co/gospelgit/African-Languages-Sentiment-Classifier).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
>
|
| 31 |
+
> **File guide for this repo:**
|
| 32 |
+
> - `train.csv` / `validation.csv` / `test.csv` — the **original, clean,
|
| 33 |
+
> human-labeled dataset** described in this card (46,725 rows, 70/15/15
|
| 34 |
+
> split). **Use these files** if you want the source data for your own
|
| 35 |
+
> training pipeline.
|
| 36 |
+
> - `ha_yo_sw_sentimentAnalysis.csv` — the **AutoScientist-adapted version**,
|
| 37 |
+
> produced by AutoScientist's data-evolution step during the AutoScientist
|
| 38 |
+
> Challenge submission process. This is **not** the primary dataset and is
|
| 39 |
+
> included for transparency/reproducibility of that specific challenge
|
| 40 |
+
> submission, not as a recommended starting point.
|
| 41 |
+
|
| 42 |
+
## Why this dataset
|
| 43 |
+
|
| 44 |
+
Existing sentiment resources for these languages are dominated by a single
|
| 45 |
+
domain (Twitter). This dataset combines **three different sources across
|
| 46 |
+
three different domains** to reduce domain overfitting and give a more
|
| 47 |
+
robust sentiment signal:
|
| 48 |
+
|
| 49 |
+
| Source | Domain | Languages | Rows |
|
| 50 |
+
|---|---|---|---|
|
| 51 |
+
| [AfriSenti](https://github.com/afrisenti-semeval/afrisent-semeval-2023) | Twitter | Hausa, Yorùbá, Swahili | 40,290 |
|
| 52 |
+
| [NollySenti](https://github.com/IyanuSh/NollySenti) | Nollywood movie reviews (human-translated) | Hausa, Yorùbá | 2,510 |
|
| 53 |
+
| [Neurotech-HQ Swahili](https://github.com/Neurotech-HQ/swahili-sentiment-analysis-dataset) | Social media / product reviews (back-translated) | Swahili | 3,925 |
|
| 54 |
+
|
| 55 |
+
## Dataset structure
|
| 56 |
+
|
| 57 |
+
- `text`: the raw text (tweet, movie review, or social media comment)
|
| 58 |
+
- `label`: one of `positive`, `negative`, `neutral` (single unified label column)
|
| 59 |
+
- `language`: `hausa`, `yoruba`, or `swahili`
|
| 60 |
+
- `source`: which of the three original datasets the row came from
|
| 61 |
+
- `domain`: `twitter`, `movie_review`, or `social_media_reviews`
|
| 62 |
+
- `split`: `train`, `validation`, or `test`
|
| 63 |
+
|
| 64 |
+
## Splits
|
| 65 |
+
|
| 66 |
+
All three languages use an identical **70 / 15 / 15** train/validation/test
|
| 67 |
+
split, stratified by label, computed after pooling all sources per language
|
| 68 |
+
(not the original per-source splits — see Limitations).
|
| 69 |
+
|
| 70 |
+
| Language | Total | Train | Validation | Test |
|
| 71 |
+
|---|---|---|---|---|
|
| 72 |
+
| Hausa | 23,162 | 16,213 | 3,474 | 3,475 |
|
| 73 |
+
| Yorùbá | 16,627 | 11,639 | 2,494 | 2,494 |
|
| 74 |
+
| Swahili | 6,936 | 4,855 | 1,040 | 1,041 |
|
| 75 |
+
|
| 76 |
+
## Intended use
|
| 77 |
+
|
| 78 |
+
Training and evaluating sentiment classification models for Hausa, Yorùbá,
|
| 79 |
+
and Swahili — particularly for benchmarking multilingual co-optimized
|
| 80 |
+
training approaches (e.g. AutoScientist) against single-source baselines
|
| 81 |
+
like `Davlan/afrisenti-twitter-sentiment-afroxlmr-large`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
## Limitations
|
| 84 |
|
| 85 |
+
- **Label imbalance across sources**: NollySenti and the Neurotech Swahili
|
| 86 |
+
set are binary (positive/negative only). `neutral` examples come
|
| 87 |
+
exclusively from AfriSenti, so neutral coverage is thinner relative to
|
| 88 |
+
positive/negative for all three languages.
|
| 89 |
+
- **Re-split, not original splits**: because splits were recomputed by
|
| 90 |
+
pooling sources, this is not directly comparable row-for-row to
|
| 91 |
+
benchmarks trained on the original AfriSenti or NollySenti splits. Use
|
| 92 |
+
as a fresh baseline, not a drop-in replacement.
|
| 93 |
+
- **Neurotech Swahili has no official original split** — an 80/10/10 split
|
| 94 |
+
was assigned with a fixed seed (42) before being pooled and re-split here.
|
| 95 |
+
- **Swahili domain composition differs** from Hausa/Yorùbá: it is roughly
|
| 96 |
+
half Twitter, half social-media/product reviews, while Hausa and Yorùbá
|
| 97 |
+
are Twitter-dominant with a smaller movie-review slice.
|
| 98 |
|
| 99 |
## Citation
|
| 100 |
|
| 101 |
+
If you use this combined dataset, please cite all three original sources:
|
| 102 |
+
|
| 103 |
+
```
|
| 104 |
+
@inproceedings{muhammad2023afrisenti,
|
| 105 |
+
title={AfriSenti: A Twitter Sentiment Analysis Benchmark for African Languages},
|
| 106 |
+
author={Muhammad, Shamsuddeen Hassan and others},
|
| 107 |
+
year={2023}
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
@inproceedings{shode2023nollysenti,
|
| 111 |
+
title={NollySenti: Leveraging Transfer Learning and Machine Translation for Nigerian Movie Sentiment Classification},
|
| 112 |
+
author={Shode, Iyanuoluwa and Adelani, David Ifeoluwa and Peng, Jing and Feldman, Anna},
|
| 113 |
+
year={2023}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
@misc{neurotech2021swahili,
|
| 117 |
+
title={Swahili Sentiment Analysis Dataset},
|
| 118 |
+
author={Neurotech-HQ},
|
| 119 |
+
year={2021},
|
| 120 |
+
howpublished={\\url{https://github.com/Neurotech-HQ/swahili-sentiment-analysis-dataset}}
|
| 121 |
+
}
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
## Submission context
|
| 125 |
+
|
| 126 |
+
Built for the Adaption Labs AutoScientist Challenge (Language category),
|
| 127 |
+
targeting Hausa, Yorùbá, and Swahili as officially supported languages.
|