SHARE
TWEET

Untitled

a guest Jun 15th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. title,type
  2. Women Jacket A,Clothes
  3. Mens Running Shoes B,Shoes
  4. Children backpack,Bags
  5.      
  6. from textblob.classifiers import NaiveBayesClassifier
  7.  
  8. with open('train_small.csv', 'r') as fp:
  9.     cl = NaiveBayesClassifier(fp, format="csv")
  10.  
  11. print ( cl.classify("Womens running shoe") )
  12.      
  13. Operating System: Kubuntu 19.04
  14. Kernel Version: 5.0.0-15-generic
  15. OS Type: 64-bit
  16. Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz
  17. Memory: 7.7 GiB of RAM
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top