Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Shakour
clowdflows
Commits
9418e822
Commit
9418e822
authored
Mar 20, 2015
by
vpodpecan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new MUSE widgets + fix for Display string (no auto wrapping)
parent
bb86f0c3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
227 additions
and
1 deletion
+227
-1
workflows/MUSE_v3/library.py
workflows/MUSE_v3/library.py
+46
-0
workflows/MUSE_v3/package_data/widgets/4f54f09a-e9c7-4849-9316-87d10b3e1c5e.json
...ge_data/widgets/4f54f09a-e9c7-4849-9316-87d10b3e1c5e.json
+73
-0
workflows/MUSE_v3/package_data/widgets/65b7fbf9-3459-433c-bb41-635c08e2a19e.json
...ge_data/widgets/65b7fbf9-3459-433c-bb41-635c08e2a19e.json
+107
-0
workflows/templates/visualizations/display_string.html
workflows/templates/visualizations/display_string.html
+1
-1
No files found.
workflows/MUSE_v3/library.py
View file @
9418e822
...
...
@@ -34,3 +34,49 @@ def MUSE_coreference(input_dict):
corefs
=
result
.
response_dict
[
'result'
]
return
{
'coreferences'
:
corefs
}
#end
def
MUSE_SRL
(
input_dict
):
url
=
input_dict
[
'url'
]
tokens
=
input_dict
[
'tokens'
]
import
socket
socket
.
setdefaulttimeout
(
None
)
cli
=
JSONWSPClient
(
url
)
result
=
cli
.
SRL
(
tokens
=
tokens
)
srl
=
result
.
response_dict
[
'result'
]
return
{
'srl'
:
srl
}
#end
def
MUSE_directspeech
(
input_dict
):
url
=
input_dict
[
'url'
]
srl
=
input_dict
[
'srl'
]
coref
=
input_dict
[
'coref'
]
entities
=
input_dict
[
'entities'
]
import
socket
socket
.
setdefaulttimeout
(
None
)
cli
=
JSONWSPClient
(
url
)
result
=
cli
.
direct_speech
(
srl
=
srl
,
coref
=
coref
,
entities
=
entities
)
dspeech
=
result
.
response_dict
[
'result'
]
return
{
'directspeech'
:
dspeech
}
#end
workflows/MUSE_v3/package_data/widgets/4f54f09a-e9c7-4849-9316-87d10b3e1c5e.json
0 → 100644
View file @
9418e822
[
{
"model"
:
"workflows.abstractwidget"
,
"fields"
:
{
"category"
:
"c0ecc61e-3fe1-4681-8ed7-8d45e796d9d0"
,
"treeview_image"
:
""
,
"uid"
:
"4f54f09a-e9c7-4849-9316-87d10b3e1c5e"
,
"windows_queue"
:
false
,
"package"
:
"MUSE_v3"
,
"interaction_view"
:
""
,
"has_progress_bar"
:
false
,
"image"
:
""
,
"description"
:
"This function performs semantic role labelling on tokenised text."
,
"static_image"
:
""
,
"action"
:
"MUSE_SRL"
,
"visualization_view"
:
""
,
"streaming_visualization_view"
:
""
,
"post_interact_action"
:
""
,
"wsdl_method"
:
""
,
"wsdl"
:
""
,
"interactive"
:
false
,
"is_streaming"
:
false
,
"order"
:
1
,
"name"
:
"Semantic role labelling"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"4f54f09a-e9c7-4849-9316-87d10b3e1c5e"
,
"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"
:
"4acb5124-4e76-49ad-b5cd-e86aea55cf70"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"4f54f09a-e9c7-4849-9316-87d10b3e1c5e"
,
"name"
:
"Tokens"
,
"short_name"
:
"tok"
,
"default"
:
""
,
"description"
:
"Tokenised text"
,
"required"
:
true
,
"multi"
:
false
,
"parameter_type"
:
null
,
"variable"
:
"tokens"
,
"parameter"
:
false
,
"order"
:
1
,
"uid"
:
"f5d71cb7-1965-44c7-91d5-4cfd6cd27af7"
}
},
{
"model"
:
"workflows.abstractoutput"
,
"fields"
:
{
"widget"
:
"4f54f09a-e9c7-4849-9316-87d10b3e1c5e"
,
"name"
:
"Semantic role labels"
,
"short_name"
:
"srl"
,
"description"
:
"Tokenised sentences with semantic roles and other information"
,
"variable"
:
"srl"
,
"order"
:
1
,
"uid"
:
"fad56b23-dd4b-41f7-91e3-460f9cee5883"
}
}
]
\ No newline at end of file
workflows/MUSE_v3/package_data/widgets/65b7fbf9-3459-433c-bb41-635c08e2a19e.json
0 → 100644
View file @
9418e822
[
{
"model"
:
"workflows.abstractwidget"
,
"fields"
:
{
"category"
:
"c0ecc61e-3fe1-4681-8ed7-8d45e796d9d0"
,
"treeview_image"
:
""
,
"uid"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"windows_queue"
:
false
,
"package"
:
"MUSE_v3"
,
"interaction_view"
:
""
,
"has_progress_bar"
:
false
,
"image"
:
""
,
"description"
:
"Detection of direct speech."
,
"static_image"
:
""
,
"action"
:
"MUSE_directspeech"
,
"visualization_view"
:
""
,
"streaming_visualization_view"
:
""
,
"post_interact_action"
:
""
,
"wsdl_method"
:
""
,
"wsdl"
:
""
,
"interactive"
:
false
,
"is_streaming"
:
false
,
"order"
:
1
,
"name"
:
"Direct speech"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"name"
:
"Entities"
,
"short_name"
:
"ent"
,
"default"
:
""
,
"description"
:
"Entities for direct speech detection"
,
"required"
:
true
,
"multi"
:
false
,
"parameter_type"
:
null
,
"variable"
:
"entities"
,
"parameter"
:
false
,
"order"
:
3
,
"uid"
:
"521e857d-d0aa-4a82-8f72-07b713f65ab4"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"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"
:
"84adf867-26cd-4e74-884e-1c7f351c7238"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"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"
:
4
,
"uid"
:
"916b1832-7e59-4988-9bcc-3e64c6af4978"
}
},
{
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"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"
:
"d7e6c005-383a-4df6-82c7-6b4bbe8ae37e"
}
},
{
"model"
:
"workflows.abstractoutput"
,
"fields"
:
{
"widget"
:
"65b7fbf9-3459-433c-bb41-635c08e2a19e"
,
"name"
:
"Direct speech"
,
"short_name"
:
"dsp"
,
"description"
:
"Detected direct speech"
,
"variable"
:
"directspeech"
,
"order"
:
1
,
"uid"
:
"0eb0be93-773c-438a-9a1b-b099d04b9d6f"
}
}
]
\ No newline at end of file
workflows/templates/visualizations/display_string.html
View file @
9418e822
<div
id=
"widgetvisualization-{{widget.pk}}"
rel=
"{{widget.pk}}"
class=
"widgetvisualizationdialog"
title=
"{{widget.name}} visualization"
>
<div
style=
"width:400px;white-space:pre-wrap;font-family:monospace;"
>
<pre
style=
"width:400px !important;white-space:pre
-wrap
"
>
<pre
style=
"width:400px !important;white-space:pre"
>
{{input_dict.string}}
</pre>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment