Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

Β© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

labrijisaad/Sentiment-Analysis-model-for-the-Wolof-language

Domain:

natural language processing

Record type:

model
Creator:
lab
Host:
In this notebook, I tried to create a sentiment analysis model for Wolof language. # πŸ“ˆ `Sentiment Analysis model for the Wolof language` 🌍: - 🎯 In this notebook, I tried to create a **`sentiment analysis model for Wolof language`**. - πŸ€” To do this, I gathered data already labeled in different datasets extracted from different sources (Quran, Bible, proverbs, twitter): The notebooks I used for web scraping can be found in my github repository). - ⏭ Next, i used some of scikit learn's most well-known classification models with **`TF-IDF Vectorizer`** to train the final model: - **`Logistic Regression`** - **`Bernoulli Naive Bayes`** - **`Decision Tree`** - **`Support vector machine`** - Here are **TWO** ways to use the trained model in notebook: (You must before install the requirements) ##### meth 1 > via model and vectorizer import ```py import pickle import pandas as pd import re SVM_model = pickle.load(open('SVM_model.pkl', 'rb')) SVM_vectorizer = pickle.load(open("SVM_vectorizer.pk","rb")) LR_model = pickle.load(open('LR_model.pkl', 'rb')) LR_vectorizer = pickle.load(open("LR_vectorizer.pk","rb")) def process_wolof_text(text): ## text processing text = text.lower() text = remove_ponctuation(text) text = cleaning_numbers(text) text = cleaning_stopwords(text) text = remove_ponctuation(text) text = re.sub("\s\s+", " ", text) return text def predict_sentiment_svm(text): serie = pd.Series(text) vector = SVM_vectorizer.transform(serie) return str(SVM_model.predict(vector)[0]) def predict_wolof_with_logistic_regression(text): text = process_wolof_text(text) text = [text] text = LR_vectorizer.transform(text) return "POSITIVE" if (LR_model.predict(text)[0] == 1) else "NEGATIVE" text = "dafa xΓ«m" # Il est Γ©vanoui print(predict_wolof_with_logistic_regression(text)) print(predict_sentiment_svm(text)) >>> NEGATIVE >>> NEGATIVE ``` ##### meth 2 > by calling a script that does all the work for us ```py text = "Na nga def ?" var = !python model/wolof_sentiment.py $text print(var[-1]) >>> 1 ``` - πŸ’ͺ Model performance: Here are the results …

Visit

github.com

Tasks

sentiment analysistext classification

Languages

Wolof

Similar

hibaid01/sentiment-analysis-woloflabrijisaad/Language-Identifier-SVMIammteo/Sentiment-analysis-model-for-Nigerian-pidgin-Low-resource-language-FWLSA-score: French and Wolof Lexicon-based for Sentiment AnalysisReaganHuang/wolof-language-modelTamsir123/wolof-language-model

hibaid01/sentiment-analysis-wolof

labrijisaad/Language-Identifier-SVM

Language identification script that can detect the language of a given text. Currently supports Swah

Iammteo/Sentiment-analysis-model-for-Nigerian-pidgin-Low-resource-language-

This is a machine learning project of a Nigerian Pidgin sentiment analysis model specifically design

FWLSA-score: French and Wolof Lexicon-based for Sentiment Analysis

ReaganHuang/wolof-language-model

Built language models for the African language Wolof. For this study, we mainly focus on Senegalese

Tamsir123/wolof-language-model