mirror of
https://github.com/gsi-upm/senpy
synced 2025-09-17 12:02:21 +00:00
Improved plugins, better tests, gevent
Moved from Yapsy again (it is not flexible enough), now we use a custom solution. The activation and deactivation of plugins is asynchronous, so that plugins that take a long time don't interfere with the rest.
This commit is contained in:
@@ -77,7 +77,7 @@ class Entry(Leaf):
|
||||
|
||||
|
||||
class Opinion(Leaf):
|
||||
opinionContext = {}
|
||||
opinionContext = {"@vocab": "http://www.gsi.dit.upm.es/ontologies/marl/ns#"}
|
||||
def __init__(self, polarityValue=None, hasPolarity=None, *args, **kwargs):
|
||||
super(Opinion, self).__init__(context=self.opinionContext,
|
||||
*args,
|
||||
@@ -93,7 +93,14 @@ class EmotionSet(Leaf):
|
||||
def __init__(self, emotions=None, *args, **kwargs):
|
||||
if not emotions:
|
||||
emotions = []
|
||||
super(EmotionSet, self).__init__(context=self.emotionContext,
|
||||
super(EmotionSet, self).__init__(context=EmotionSet.emotionContext,
|
||||
*args,
|
||||
**kwargs)
|
||||
self.emotions = emotions or []
|
||||
|
||||
class Emotion(Leaf):
|
||||
emotionContext = {}
|
||||
def __init__(self, emotions=None, *args, **kwargs):
|
||||
super(EmotionSet, self).__init__(context=Emotion.emotionContext,
|
||||
*args,
|
||||
**kwargs)
|
||||
|
Reference in New Issue
Block a user