how to create function that assign polarity (Positive,Negative,Neurtal) to words or phrase .

77 views
Skip to first unread message

noor-ul-huda shaikh

unread,
Sep 16, 2014, 7:20:20 AM9/16/14
to pattern-f...@googlegroups.com



i am doing reseach work on  sentiment analysis of tweets .i have to create a FUNCTION in python when i give some word or phrase as an input it check that word in dictionary that contain words along with its lables (GOOD->POSITIVE,BAD->NEGATIVE,TWITTER->NEUTRAL) and than return me polarity of word i.e either word is Positive,negative or neutral . 

like if i enter i dislike this article. so as an output python code RETURN me NEGATIVE

i like this article .so as an output python code RETURN me POSITIVE

twitter users .so as an output python code RETURN me NEUTRAL

as i am student and i am not as much familiar with python can any on tell me how i can create such FUNCTION using python or if there is some open source code available that provide same functionality . 

NOTE : i have to make use of wordnet ,NLTK and i donot want to use any machine learning technique. thanks

Reply all
Reply to author
Forward
0 new messages