Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
senpy
senpy
Commits
2288b04c
Commit
2288b04c
authored
Mar 01, 2017
by
J. Fernando Sánchez
Browse files
Remove iteritems for py2/3 compatibility
parent
7899cb4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
senpy/__init__.py
View file @
2288b04c
...
...
@@ -17,7 +17,9 @@
"""
Sentiment analysis server in Python
"""
from
__future__
import
print_function
from
future
import
standard_library
standard_library
.
install_aliases
()
from
.version
import
__version__
import
logging
...
...
senpy/extensions.py
View file @
2288b04c
...
...
@@ -2,8 +2,6 @@
Main class for Senpy.
It orchestrates plugin (de)activation and analysis.
"""
from
future
import
standard_library
standard_library
.
install_aliases
()
from
.plugins
import
SentimentPlugin
,
SenpyPlugin
from
.models
import
Error
,
Entry
,
Results
...
...
senpy/plugins/conversion/centroids.py
View file @
2288b04c
...
...
@@ -13,7 +13,7 @@ class CentroidConversion(EmotionConversionPlugin):
for
e
in
original
.
onyx__hasEmotion
:
category
=
e
.
onyx__hasEmotionCategory
if
category
in
self
.
centroids
:
for
dim
,
value
in
self
.
centroids
[
category
].
iter
items
():
for
dim
,
value
in
self
.
centroids
[
category
].
items
():
try
:
res
[
dim
]
+=
value
except
Exception
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment