1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-09-28 17:01:43 +00:00
senpy/example-plugin/example.py

18 lines
515 B
Python
Raw Normal View History

2015-10-08 17:07:48 +00:00
from senpy.plugins import SentimentPlugin
from senpy.models import Response
import logging
logger = logging.getLogger(__name__)
class ExamplePlugin(SentimentPlugin):
def __init__(self, *args, **kwargs):
super(ExamplePlugin, self).__init__(*args, **kwargs)
logger.warn('%s: the answer to life, the universe and everything'
% self._info.get('custom_attribute'))
def analyse(self, *args, **kwargs):
logger.warn('Analysing with the example')
return Response()