Logo Lanfrica

rebiraolin/amharic-naive-bayes

Domain:

natural language processing

Record type:

projectsoftware
Creator:
reb
Host:
# Naive Bayes from First Principles: Amharic News Topic Classification A **from-scratch Multinomial Naive Bayes** classifier for Amharic news topic classification, implemented using only Python and NumPy — no scikit-learn or any ML library is used for the classifier or evaluation metrics. ## Project Summary This project classifies ~51,000 Amharic-language news articles into 6 topic categories using a Multinomial Naive Bayes classifier built entirely from scratch. Every component — tokenization, train/test splitting, prior and likelihood computation, Laplace smoothing, log-space prediction, and evaluation metrics (accuracy, precision, recall, F1, confusion matrix) — is implemented manually with NumPy. **Categories (6 classes):** | Amharic Label | English Translation | |---|---| | ሀገር አቀፍ ዜና | National News | | ስፖርት | Sports | | ፖለቲካ | Politics | | ዓለም አቀፍ ዜና | International News | | ቢዝነስ | Business | | መዝናኛ | Entertainment | ## Dataset Setup (Required Before Running) The dataset (~191 MB) is **not included** in this repository. You must download and extract it manually. ### Step-by-step instructions: 1. **Go to the dataset repository:** An Amharic News Text classi… 2. **Download the zip file:** - Navigate to the `data/` folder in that repository - Click on `Amharic News Dataset.zip` - Click the **"Download raw file"** button (the download icon on the right side) - Alternatively, direct link: data/Amharic News Dataset.zip 3. **Extract the CSV file:** - **Windows:** Right-click the downloaded `.zip` → "Extract All..." → extract to this project's `data/` folder - **Mac/Linux:** Run `unzip "Amharic News Dataset.zip"` in the `data/` directory 4. **Verify the file is in the right place:** After extraction, your project should look like this: ``` amharic-naive-bayes/ ├── data/ │ └── Amharic News Dataset.csv ← this file must exist here ├── final/ │ └── naive_bayes_amharic_news.ipynb ├── README.md └── .gitignore …