Downloads · 30 days
11
2% of all-time downloads
mangaphd/HausaBERTa
HausaBERTa is a text classification model from mangaphd. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
probably proofread and complete it, then remove this comment. --
Downloads · 30 days
11
2% of all-time downloads
All-time downloads
565
Public
Repo size
434 MB
Likes
0
Public
Click a slice to open those files.
.h5434 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of bert-base-cased trained on mangaphd/hausaBERTdatatrain dataset. It achieves the following results on the evaluation set:
The sentiment fine-tuning was done on Hausa Language.
Model Repository : https://github.com/idimohammed/HausaBERTa
HausaSentiLex is a pretrained lexicon low resources language model. The model was trained on Hausa Language (Hausa is a Chadic language spoken by the Hausa people in the northern half of Nigeria, Niger, Ghana, Cameroon, Benin and Togo, and the southern half of Niger, Chad and Sudan, with significant minorities in Ivory Coast. It is the most widely spoken language in West Africa, and one of the most widely spoken languages in Africa as a whole). The model has been shown to obtain competitive downstream performances on text classification on trained language
You can use this model with Transformers for sentiment analysis task in Hausa Language.
Add the following codes for ease of interpretation
import pandas as pd def sentiment_analysis(text): rs = pipe(text) df = pd.DataFrame(rs) senti=df['label'][0] score=df['score'][0] if senti == 'LABEL_0' and score > 0.5: lb='NEGATIVE' elif senti == 'LABEL_1' and score > 0.5: lb='POSITIVE' else: lb='NEUTRAL' return lb
call sentiment_analysis('Your text here') while using the model
The following hyperparameters were used during training:
| Train Loss | Train Accuracy | Epoch |
|---|---|---|
| 0.2108 | 0.9168 | 0 |
| 0.1593 | 0.9385 | 1 |
| 0.0151 | 0.9849 | 2 |