Pasted method from tweet_snetiments.py instead of importing.