1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-25 01:22:28 +00:00
senpy/tests/plugins/dummy_plugin/dummy.py
J. Fernando Sánchez a8614bab0c Accept plugin pipelines
Closes #15
2017-03-13 21:08:21 +01:00

9 lines
236 B
Python

from senpy.plugins import SentimentPlugin
class DummyPlugin(SentimentPlugin):
def analyse_entry(self, entry, params):
entry.text = entry.text[::-1]
entry.reversed = entry.get('reversed', 0) + 1
yield entry