You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/12/07 09:58:25 UTC
[kibble-scanners] branch master updated: ensure that azure returns
a valid response
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble-scanners.git
The following commit(s) were added to refs/heads/master by this push:
new a4f651b ensure that azure returns a valid response
a4f651b is described below
commit a4f651b17878092242311625cb7c5393b3e9223e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Dec 7 10:58:15 2017 +0100
ensure that azure returns a valid response
---
src/plugins/utils/tone.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/utils/tone.py b/src/plugins/utils/tone.py
index 8b12614..0ba3ca9 100644
--- a/src/plugins/utils/tone.py
+++ b/src/plugins/utils/tone.py
@@ -99,7 +99,7 @@ def azureTone(KibbleBit, body):
except:
jsout = {} # borked sentiment analysis?
mood = {}
- if 'documents' in jsout:
+ if 'documents' in jsout and len(jsout['documents']) > 0:
# This is more parred than Watson, so we'll split it into three groups: positive, neutral and negative.
# Divide into four segments, 0->40%, 25->75% and 60->100%.
# 0-40 promotes negative, 60-100 promotes positive, and 25-75% promotes neutral.
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].