Skip to content

mehuaniket/blog-classifier

Repository files navigation

Blog-Classifier

Introduction

  • This is small tool to classify blog in categories using random-forest.
  • Training set is in blogs.csv in following format
  • To predict category for blog you've to use use_forest_prediction.py. May be you can change the way data is provided to the function to integrate with backend.
   |----------------------|
   |   blog  |  category  |
   |----------------------|

Installation

  • Installing dependency from requirements.txt using following command
   pip install -r requirements.txt
  • Training from blogs.csv (save model in forest.pickle and vocab.pickle)
  • run following command in folder.
   python bag-of-words.py
  • comment out 15th line in bag-of-words.py after downloading stopwords from popup.

Make Prediction

  • In order to make prediction,Run `user_forest_prediction.py'
   python user_forest_predition.py

Releases

No releases published

Packages

No packages published

Languages