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 β¦