Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import Counter
- dic={'phone get crasted': 0,'good performance':1,'good camera': 1,'cheap in price':1,'battery drains fast':0}
- pos=0
- neg=0
- for i in dic:
- if dic[i]==0:
- neg=neg+1
- else:
- pos=pos+1
- pos=pos/5
- neg=neg/5
- #print(pos,' ',neg)
- for k,v in dic.items():
- print(Counter(k.lower().split()))
- # for j in k:
- #print(j)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement