Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from textblob.classifiers import NaiveBayesClassifier
- from textblob import TextBlob
- train = [
- ('what did I miss', 'show-notifications'),
- ('what happen while I was gone', 'show-notifications'),
- ('any new events', 'show-notifications'),
- ('clear all', 'clear-notifications'),
- ('delete all','clear-notifications')
- ]
- cl = NaiveBayesClassifier(train)
- print cl.classify('delete everything')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement