A machine learning application for identifying English, Hausa, Igbo, and Yoruba text.
\# 🇳🇬 Nigerian Language Classifier
A machine learning application that identifies whether a short text is written in English, Hausa, Igbo, or Yoruba. Built as a capstone project for the \*\*3MTT / NextGen AI \& Machine Learning\*\* program.
\## 📌 Project Overview
Language identification is an important component of many applications, including chatbots, translation systems, search engines, and other natural language processing (NLP) applications. This project develops a machine learning classifier that can identify four languages commonly used in Nigeria:
\- 🇬🇧 English
\- 🇳🇬 Hausa
\- 🇳🇬 Igbo
\- 🇳🇬 Yoruba
The application accepts a short text phrase and predicts the most likely language.
\## 🎯 Project Objective
The main objective is to build a working language classification system that can:
\- Accept a short text phrase as input
\- Identify the language of the text
\- Evaluate model performance using standard classification metrics
\- Provide an interactive user interface
\- Demonstrate the application of machine learning to a Nigerian context
\## ✨ Features
\- Text-based language identification
\- Supports English, Hausa, Igbo, and Yoruba
\- TF-IDF character n-gram feature extraction
\- Logistic Regression classification
\- Accuracy, precision, recall, and F1-score evaluation
\- Confusion matrix visualization
\- Manual testing with unseen phrases
\- Model confidence/probability estimates
\- Interactive Gradio web interface
\- Saved model and vectorizer for reuse
\## đź§ How It Works
The application follows this pipeline:
User enters text
↓
TF-IDF Character N-Gram Vectorization
↓
Logistic Regression Classifier
↓
Language Prediction
↓
Confidence / Probability Scores
1\. Text Input - The user provides a short phrase. Example: Bawo ni o se wa loni?
2\. Feature Extraction
The …