IsiZulu Genre Classification Software
###HonoursProject
##This is an implemenation of IsiZulu Genre Classification model
In this project we have used FastText and Word2Vec word embeddings
In order to run the software you need the isiZulu dataset,
Download the dataset from the SaDiLAR website.
Here's the link to the dataset,
repo.sadilar.org , but I have attached the folder together with the sofware.
The pre-trained fastText word vectors for isiZulu are from this link
fasttext.cc, but I have attached the folder together with the sofware.
We have also implemented our own word embeddings :
Word2vec vectors for isiZulu language
Here's the link to the folder with the embedding models.
stuukznac-my.sharepoint.com , but I have attached the folder together with the sofware.
The setup for the FastText word Vectors
Data pre-processing.
Install FastText
pip install Fasttext
import all necessary libraries
Numpy,
Pandas,
Matplot, for visualization of dataset
TensorFlow
Sklearn import the classifiers
Nltk
Load using KeyedVectors.load_format method from gensim word vectors
Text cleaning
download the english nltk stopwords from nltk
import nltk
##ALSO NOTE THAT I HAVE MODIFIED THE DATASET DIRECTORY BY COMBINING THE TEST DATA WITH THE TRAINING DATA INTO ONE GENRE FOLDER
WHEN YOU DOWNLOAD THE DATASET IT WILL HAVE SOMETHING LIKE THIS : C:\Users\lwazi\OneDrive\Documents\COMP700\zu\zu\zu\NF-NEU\Test
SO I MODIFIED IT SO THAT I CAN DO THE SPLIT THE DATA TO TRAIN AND TEST USING train_test_split
Split the data to train and test data with a test size of 0.2
Using train_test_split
Download nltk from punkt from nltk
Convert text data into vector representation using fasttext pre-trained model
Cl …