Commit 983f3579 authored by Janez's avatar Janez

Merge branch 'muse' of /home/git/repositories/kt/mothra

parents 813a195a 50268761
......@@ -10,7 +10,7 @@ except ImportError:
def MUSE_preprocessing(input_dict):
url = input_dict['url']
text = input_dict['text']
text = input_dict['text'].strip()
import socket
socket.setdefaulttimeout(None)
......@@ -98,7 +98,7 @@ def MUSE_prepare_mapping(input_dict):
def MUSE_event_temprel_detection(input_dict):
text = input_dict['text']
text = input_dict['text'].strip()
url = input_dict['url']
import socket
......@@ -112,7 +112,7 @@ def MUSE_event_temprel_detection(input_dict):
def MUSE_PG_preprocessing(input_dict):
text = input_dict['text']
text = input_dict['text'].strip()
url = input_dict['url']
import socket
......@@ -125,13 +125,65 @@ def MUSE_PG_preprocessing(input_dict):
#end
def MUSE_PG_SRL(input_dict):
url = input_dict['url']
tokens = input_dict['tokens']
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.PG_SRL(tokens=tokens)
srl = result.response_dict['result']
return {'srl': srl}
#end
def MUSE_PG_coreference(input_dict):
url = input_dict['url']
tokens = input_dict['tokens']
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.PG_coreference(tokens=tokens)
coref, preproc = result.response_dict['result']
return {'coref': coref, 'preproc': preproc}
#end
def MUSE_PG_mappingVWR(input_dict):
url = input_dict['url']
srl = input_dict['srl']
coref = input_dict['coref']
info = input_dict['info']
events = input_dict['events']
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.PG_mappingVWR(srl=srl, coref=coref, info=info, events=events)
mapping = result.response_dict['result']
return {'mapping': mapping}
#end
def MUSE_PG_event_temprel_detection(input_dict):
url = input_dict['url']
preproc = input_dict['preproc'].strip()
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.PG_event_temprel_detection(preprocessed=preproc)
result = result.response_dict['result']
return {'xml': result}
#end
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "3b5afcdf-231b-4484-8d0e-6a23852e0e95",
"treeview_image": "",
"uid": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "This function performs mapping of the patient guideline text and its linguistic annotations to the set of templates provided by Teesside University. Developed @ KUL.",
"static_image": "",
"action": "MUSE_PG_mappingVWR",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "PG mapping"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"name": "Semantic role labels",
"short_name": "srl",
"default": "",
"description": "Tokenised sentences with semantic roles",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "srl",
"parameter": false,
"order": 1,
"uid": "260050a3-724d-461a-8676-80479627d673"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"name": "Events and temporal relations",
"short_name": "xml",
"default": "",
"description": "Events and temporal relations between these events",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "events",
"parameter": false,
"order": 3,
"uid": "c46851d0-d233-4825-967c-5ccdf00c9c79"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"name": "Text structure",
"short_name": "tsr",
"default": "",
"description": "Recognised text structure",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "info",
"parameter": false,
"order": 4,
"uid": "d920e78b-0f0b-44a7-ba26-47faf9165c18"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"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": 5,
"uid": "e8b0b049-bf1c-4bf9-96f9-16c0c9cb9811"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"name": "Coreferences",
"short_name": "cor",
"default": "",
"description": "Coreferences as produced by the coreference function",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "coref",
"parameter": false,
"order": 2,
"uid": "fa1c1c78-ea3b-4db9-a7b8-0ceb7bf69dff"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "61f21d39-ee07-4ac8-a759-998e7c0fdfe6",
"name": "Mapping",
"short_name": "map",
"description": "XML file which maps the text to the template (defined at TEES)",
"variable": "mapping",
"order": 1,
"uid": "8f245400-19f0-41a1-a7fd-1efc63dfa504"
}
}
]
\ No newline at end of file
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "3b5afcdf-231b-4484-8d0e-6a23852e0e95",
"treeview_image": "",
"uid": "920018a8-b3bd-4cf7-b465-2f7723cf5569",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "This function provide coreference resolution.",
"static_image": "",
"action": "MUSE_PG_coreference",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "PG coreference resolution"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "920018a8-b3bd-4cf7-b465-2f7723cf5569",
"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": "checkbox",
"variable": "url",
"parameter": true,
"order": 2,
"uid": "3ca0ec13-56da-40fd-81e1-2fc356855638"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "920018a8-b3bd-4cf7-b465-2f7723cf5569",
"name": "Tokens",
"short_name": "tok",
"default": "",
"description": "Tokenised text",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "tokens",
"parameter": false,
"order": 1,
"uid": "b14e182e-b20e-4762-9938-c0e804d5e1d4"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "920018a8-b3bd-4cf7-b465-2f7723cf5569",
"name": "Coreferences",
"short_name": "cor",
"description": "Coreferences found in the input tokenised text",
"variable": "coref",
"order": 1,
"uid": "96a7ac6d-f9d6-43d8-870f-62c7bb9cc853"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "920018a8-b3bd-4cf7-b465-2f7723cf5569",
"name": "Preprocessed",
"short_name": "pre",
"description": "A file containing tokens with additional preprocessing information.",
"variable": "preproc",
"order": 2,
"uid": "ec442c89-df96-46c5-8e87-de88b17330b6"
}
}
]
\ No newline at end of file
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "3b5afcdf-231b-4484-8d0e-6a23852e0e95",
"treeview_image": "",
"uid": "9749670f-6e7a-401b-a014-dd9a5f549c3d",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "This function performs semantic role labelling on tokenised text for patient guidelines.",
"static_image": "",
"action": "MUSE_PG_SRL",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "PG semantic role labelling"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "9749670f-6e7a-401b-a014-dd9a5f549c3d",
"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": "fb4d5d9e-77d7-4bbd-8c4f-d5b1dc0a0352"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "9749670f-6e7a-401b-a014-dd9a5f549c3d",
"name": "Tokens",
"short_name": "tok",
"default": "",
"description": "Tokenised text",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "tokens",
"parameter": false,
"order": 1,
"uid": "fc4dec98-76f1-47a1-9900-5cfe741b4aff"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "9749670f-6e7a-401b-a014-dd9a5f549c3d",
"name": "Semantic role labels",
"short_name": "srl",
"description": "Tokenised sentences with semantic roles and other information",
"variable": "srl",
"order": 1,
"uid": "bcd7b659-cd3b-4232-8f34-751b9adbb172"
}
}
]
\ No newline at end of file
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "3b5afcdf-231b-4484-8d0e-6a23852e0e95",
"treeview_image": "",
"uid": "cc420045-88d0-438f-a9c7-788c5ca4a384",
"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\r\n",
"static_image": "",
"action": "MUSE_PG_event_temprel_detection",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "PG event and temporal relation detection"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "cc420045-88d0-438f-a9c7-788c5ca4a384",
"name": "Preprocessed",
"short_name": "pre",
"default": "",
"description": "A file containing tokens with additional preprocessing information",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "preproc",
"parameter": false,
"order": 2,
"uid": "659c0d2d-5780-4c26-b176-023253b2e00a"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "cc420045-88d0-438f-a9c7-788c5ca4a384",
"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": 1,
"uid": "e46ac2b3-f75c-49f5-8fb5-361fbd94a9f0"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "cc420045-88d0-438f-a9c7-788c5ca4a384",
"name": "Events and temporal relations",
"short_name": "xml",
"description": "XML file with results",
"variable": "xml",
"order": 1,
"uid": "19a41a8d-1b41-4baa-afd0-86dd127cd158"
}
}
]
\ 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