Code for obtaining sentiment polarity