The Yapping Classifier will classify your yapp either as a negative yapp or a positive yapp.
To use this model on your project, you can follow this guide
You can download this repostiory from GitHub, or clone it:
git clone https://github.com/ahsanzizan/yapping_classifier.git
After installing the repository, you have to install the required packages from the requirements.txt
file. Or just run
pip install
You have to install Tensorflow to load the model because its based on the Tensorflow keras model.
pip install tensorflow
Now that you've loaded the model, you can now use it to make predictions as such:
The yapp_classifier
comes with several useful functions:
clean_yapp
for cleaning the input yapppreprocess_yapps
for pre-processing the yapps so that the model understands what you're yapping aboutclassify_yapp
for classifying the yapp as either a negative or positive yapp, will return a confidence dictionary
from yapp_classifier import YappClassifier
yapp_classifier = YappClassifier(model_path='./models/yapping_classifier_model',
tokenizer_path='./models/tokenizer.pickle',
stemmer_path='./models/stemmer.pickle')
input_text = "I love you so much that even the moon knows"
# Output: '{'positive': 0.99788, 'negative': 0.00212}'
yapp_classifier.classify_yapp(input_text)
Ahsan Awadullah Azizan - @ahsanzizan