Demo entry 6660147



Submitted by anonymous on Nov 14, 2017 at 10:46
Language: Python. Code size: 212 Bytes.

import pysentiment as ps

lm = ps.LM()
df_news['SUMMARY_SCORES'] = x: lm.get_score(lm.tokenize(str(x))))
df_news['POLARITY'] = df_news['SUMMARY_SCORES'].map(lambda x: x['Polarity'])

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).