1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-24 10:32:20 +00:00

Accept plugin pipelines

Closes #15
This commit is contained in:
J. Fernando Sánchez
2017-03-13 21:06:19 +01:00
parent 70ca74b03c
commit a8614bab0c
5 changed files with 130 additions and 74 deletions

View File

@@ -4,4 +4,5 @@ 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