Hands-On-Natural-Language-Processing-with-Python icon indicating copy to clipboard operation
Hands-On-Natural-Language-Processing-with-Python copied to clipboard

Error Finding

Open Rakib-Hasan031 opened this issue 7 years ago • 0 comments
trafficstars

image

code: sample=["Iphone is not a bad phone"] sample=tfidf.transform(sample).toarray() #print(clf.predict(sample)) sentiment=(clf.predict(sample)) if 0.5<=sentiment<=1 : print("This is a positive sentence",sentiment) else: print("This is a negetive sentence",sentiment)

Output: This is a negetive sentence [0]

the sentence is a positive sentence but in the text classifier it removes not and count bad as a negetive word.How can i solve it

Rakib-Hasan031 avatar Nov 07 '18 07:11 Rakib-Hasan031