This repository contains the official implementation for the paper "A Hybrid Ontology–Deep Learning Framework for Amharic News Classification." It features code for the hybrid CNN-BiLSTM model integrated with an Amharic news ontology, alongside all baseline classifiers (SVM, LSTM, BiLSTM, CNN, BERT).
How to Use
This guide will help you set up the environment, prepare the data, and run the models to reproduce the experiments from the paper.
1. Installation
Clone the repository and install the required Python packages.
bash
# Clone the repository
git clone github.com
cd Amharic-News-Classification
# Install dependencies (recommended: use a virtual environment)
pip install -r requirements.txt
The requirements.txt file should list packages like tensorflow, keras, pandas, scikit-learn, protégé (if applicable for ontology), SPARQL wrapper, etc.
2. Data Preparation
The experiments use the Amharic News Text Classification Dataset from Kaggle.
Download the dataset: Ensure you have the Amharic News Dataset.csv file. It can be downloaded from the official source: Amharic-News-Text-classific…
Place the data: Put the dataset file in the project's data/ directory. If the directory doesn't exist, create it.
Run preprocessing: Execute the data preprocessing script to clean, tokenize, and split the data.
bash
python src/data_preprocessing.py
This script should create train/test splits and handle any necessary text normalization.
3. Ontology Setup (For the Hybrid Model)
The hybrid model requires ontology embeddings.
Ontology File: The Amharic news ontology file (e.g., amharic_news_ontology.owl) should be located in the ontology/ directory.
Generate Embeddings: Run the ontology processing script to generate semantic embeddings.
bash
python src/ontology_processor.py
This script uses tools like Protégé APIs or SPARQL queries to extract knowledge and create embedding vectors that will be fused with the text features.
4. Model Training
You can train individual models or the full suite of baselines and the hybrid model.
Train all models (comprehensive): This script will sequentially train the SVM, LSTM, BiLSTM, CNN, BERT, and the Hybrid CNN-BiLSTM+Ontology model.
bash
py …