Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement