mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-22 08:12:27 +00:00
Remove iteritems for py2/3 compatibility
This commit is contained in:
parent
7899cb4d33
commit
2288b04c92
@ -17,7 +17,9 @@
|
|||||||
"""
|
"""
|
||||||
Sentiment analysis server in Python
|
Sentiment analysis server in Python
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from future import standard_library
|
||||||
|
standard_library.install_aliases()
|
||||||
|
|
||||||
from .version import __version__
|
from .version import __version__
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
Main class for Senpy.
|
Main class for Senpy.
|
||||||
It orchestrates plugin (de)activation and analysis.
|
It orchestrates plugin (de)activation and analysis.
|
||||||
"""
|
"""
|
||||||
from future import standard_library
|
|
||||||
standard_library.install_aliases()
|
|
||||||
|
|
||||||
from .plugins import SentimentPlugin, SenpyPlugin
|
from .plugins import SentimentPlugin, SenpyPlugin
|
||||||
from .models import Error, Entry, Results
|
from .models import Error, Entry, Results
|
||||||
|
@ -13,7 +13,7 @@ class CentroidConversion(EmotionConversionPlugin):
|
|||||||
for e in original.onyx__hasEmotion:
|
for e in original.onyx__hasEmotion:
|
||||||
category = e.onyx__hasEmotionCategory
|
category = e.onyx__hasEmotionCategory
|
||||||
if category in self.centroids:
|
if category in self.centroids:
|
||||||
for dim, value in self.centroids[category].iteritems():
|
for dim, value in self.centroids[category].items():
|
||||||
try:
|
try:
|
||||||
res[dim] += value
|
res[dim] += value
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user