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.gitAfter installing the repository, you have to install the required packages from the requirements.txt file. Or just run
pip installYou have to install Tensorflow to load the model because its based on the Tensorflow keras model.
pip install tensorflowNow 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_yappfor cleaning the input yapppreprocess_yappsfor pre-processing the yapps so that the model understands what you're yapping aboutclassify_yappfor 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