Simplest text classification implemented with Faceboo FastText library
Make sure you have fastText
python library installed
-
Fill in the
dataset\Training.txt
file with your raw training data in the format of__label__{customized} {Text need be classfied}
-
Run the
preparedata.py
This will generate two txt files:fasttext_dataset_test.txt
andfasttext_dataset_training.txt
-
Run the
train.py
which will read the two txt files generated from step 2 and then generate two modelstrained_model.bin
andtrained_model.ftz
(quantized,compact size)