Commit 62973fba authored by vpodpecan's avatar vpodpecan

new MUSE widgets

parent 9418e822
......@@ -54,7 +54,7 @@ def MUSE_directspeech(input_dict):
url = input_dict['url']
srl = input_dict['srl']
coref = input_dict['coref']
entities = input_dict['entities']
entities = input_dict['entities'].replace(' ', '')
import socket
socket.setdefaulttimeout(None)
......@@ -66,8 +66,36 @@ def MUSE_directspeech(input_dict):
#end
def MUSE_pronoun_resolution(input_dict):
url = input_dict['url']
srl = input_dict['srl']
coref = input_dict['coref']
entities = input_dict['entities'].replace(' ', '')
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.pronoun_resolution(srl=srl, coref=coref, entities=entities)
srlp = result.response_dict['result']
return {'srlpronouns': srlp}
#end
def MUSE_prepare_mapping(input_dict):
url = input_dict['url']
srlp = input_dict['srlp']
quots = input_dict['quots']
import socket
socket.setdefaulttimeout(None)
cli = JSONWSPClient(url)
result = cli.prepare_for_mapping(srlpronouns=srlp, quotations=quots)
imapping = result.response_dict['result']
return {'imapping': imapping}
#end
......
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "c0ecc61e-3fe1-4681-8ed7-8d45e796d9d0",
"treeview_image": "",
"uid": "16c3f642-d209-4c7e-a510-0a58c195b465",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "Pronoun resolution (a preparation for producing mapping)",
"static_image": "",
"action": "MUSE_pronoun_resolution",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "SRL pronoun resolution"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "16c3f642-d209-4c7e-a510-0a58c195b465",
"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": 1,
"uid": "0e2e7771-1fe5-4b8a-9342-c83add081542"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "16c3f642-d209-4c7e-a510-0a58c195b465",
"name": "Entities",
"short_name": "ent",
"default": "",
"description": "Entities for direct speech detection",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "entities",
"parameter": false,
"order": 1,
"uid": "1afdf029-a478-4dd5-a486-6825b8a45ab6"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "16c3f642-d209-4c7e-a510-0a58c195b465",
"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": "3c8b8d2f-5020-4850-a4e6-f499329b3966"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "16c3f642-d209-4c7e-a510-0a58c195b465",
"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": "bae838c7-a5b5-4d3f-85b1-b591058e2379"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "16c3f642-d209-4c7e-a510-0a58c195b465",
"name": "Processed SRL",
"short_name": "srl",
"description": "SRL with pronoun resolution",
"variable": "srlpronouns",
"order": 1,
"uid": "b6dd88b6-46ae-4ddd-9cc2-f0034c22975e"
}
}
]
\ No newline at end of file
......@@ -21,7 +21,7 @@
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "Direct speech"
"name": "Direct speech detection"
}
},
{
......
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "c0ecc61e-3fe1-4681-8ed7-8d45e796d9d0",
"treeview_image": "",
"uid": "c004d241-3ecc-4b90-a695-0e34867a3484",
"windows_queue": false,
"package": "MUSE_v3",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "This function prepares the input for the mapping to knowledge representation function.",
"static_image": "",
"action": "MUSE_prepare_mapping",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"is_streaming": false,
"order": 1,
"name": "Prepare input for KR mapping"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "c004d241-3ecc-4b90-a695-0e34867a3484",
"name": "Processed SRL",
"short_name": "srl",
"default": "",
"description": "SRL with pronoun resolution",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "srlp",
"parameter": false,
"order": 1,
"uid": "3217eab4-6b5f-453c-b826-1ef849a7ffab"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "c004d241-3ecc-4b90-a695-0e34867a3484",
"name": "Direct speech",
"short_name": "dsp",
"default": "",
"description": "Detected direct speech",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "quots",
"parameter": false,
"order": 2,
"uid": "3d212521-c5dc-4245-aa31-506994bd0522"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "c004d241-3ecc-4b90-a695-0e34867a3484",
"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": 3,
"uid": "dee7cfb2-78e4-4663-8102-172459fc72d1"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "c004d241-3ecc-4b90-a695-0e34867a3484",
"name": "KR input",
"short_name": "ikr",
"description": "Input for knowledge representation mapping",
"variable": "imapping",
"order": 1,
"uid": "0739dcfe-fa7a-4d37-ba06-17733edecf41"
}
}
]
\ 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