dummy.py 236 Bytes
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
2
3
4
5
6
from senpy.plugins import SentimentPlugin


class DummyPlugin(SentimentPlugin):
    def analyse_entry(self, entry, params):
        entry.text = entry.text[::-1]
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
7
        entry.reversed = entry.get('reversed', 0) + 1
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
8
        yield entry