Commit 95bd612d authored by vpodpecan's avatar vpodpecan

new MUSE widgets

parent 62973fba
......@@ -97,6 +97,20 @@ def MUSE_prepare_mapping(input_dict):
#end
def MUSE_event_temprel_detection(input_dict):
text = input_dict['text']
url = input_dict['url']
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.event_temprel_detection(text=text)
result = result.response_dict['result']
return {'xml': result}
#end
......
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "c0ecc61e-3fe1-4681-8ed7-8d45e796d9d0",
"treeview_image": "",
"uid": "bc48dd88-9853-46c7-bf56-c851e453cbd6",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "This function is used to detect events and temporal relations between these events",
"static_image": "",
"action": "MUSE_event_temprel_detection",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "Event and temporal relation detection"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "bc48dd88-9853-46c7-bf56-c851e453cbd6",
"name": "Service url",
"short_name": "url",
"default": "http://grom.ijs.si:8001/MUSE_services_V3/jsonwsp/description",
"description": "URL of the MUSE service",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "url",
"parameter": true,
"order": 2,
"uid": "3320bd29-de49-471c-a72d-0b4f5b422692"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "bc48dd88-9853-46c7-bf56-c851e453cbd6",
"name": "Raw text",
"short_name": "txt",
"default": "",
"description": "Input text file",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "text",
"parameter": false,
"order": 1,
"uid": "f71a5751-8a54-4cc6-9375-53bae86e8cb8"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "bc48dd88-9853-46c7-bf56-c851e453cbd6",
"name": "Events and temporal relations",
"short_name": "xml",
"description": "XML file with results",
"variable": "xml",
"order": 1,
"uid": "b6323383-9067-427d-93d5-fb9698293df2"
}
}
]
\ No newline at end of file
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