Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit 7e0ba115 authored by Janez K's avatar Janez K
Browse files

work on active sentiment widgets

parent 3d9b41dd
This diff is collapsed.
......@@ -379,6 +379,43 @@ def streaming_active_sentiment_analysis(input_dict,widget,stream=None):
return output_dict
def streaming_active_sentiment_analysis2(input_dict,widget,stream=None):
import pickle
from pysimplesoap.client import SoapClient, SoapFault
import pysimplesoap
client = SoapClient(location = "",action = '',namespace = "",soap_ns='soap',trace = False,ns = False)
pysimplesoap.client.TIMEOUT = 600
list_of_tweets = input_dict['ltw']
new_list_of_tweets = []
for tweet in list_of_tweets:
workflow_id =
service_input = pickle.dumps((str(workflow_id),input_dict['b_size'],input_dict['q_strategy_closest'],input_dict['q_strategy_random'],new_list_of_tweets))
#print service_input
response = client.ActiveClassifyMultiple(workflowtweets=service_input)
new_ltw = pickle.loads(str(response.ActiveClassifyMultipleResult))
for new_tweet in new_ltw:
if new_tweet[0]=="True":
elif new_tweet[0]=="False":
output_dict = {}
output_dict['ltw'] = list_of_tweets
return output_dict
def streaming_sentiment_analysis(input_dict,widget,stream=None):
import pickle
from pysimplesoap.client import SoapClient, SoapFault
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment