Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lidia Contreras Ochando
clowdflows
Commits
8e997e6f
Commit
8e997e6f
authored
Sep 19, 2015
by
hiphop
Browse files
webservices url set
parent
b818f8bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflows/nlp/library.py
View file @
8e997e6f
...
...
@@ -9,7 +9,8 @@ import re
import
itertools
import
subprocess
webservices_totrtale_url
=
"http://vihar.ijs.si:8104"
webservices_totrtale_url
=
"http://172.20.0.154/totrtale"
webservice_def_ex_url
=
"http://172.20.0.154/definition"
def
merge_sentences
(
input_dict
):
"""
...
...
@@ -441,7 +442,7 @@ def nlp_term_extraction2(input_dict):
'''
Term extraction from totrtale annotations.
'''
ws_url
=
"http://vihar.ijs.si:8081
/call"
ws_url
=
webservice_def_ex_url
+
"
/call"
annotations
=
input_dict
[
'annotations'
]
lang
=
input_dict
[
'lang'
]
stop_list_checkbox
=
input_dict
[
"stop_list"
]
==
"true"
...
...
@@ -525,7 +526,7 @@ def nlp_def_extraction_patterns2(input_dict):
if
'<TEI xmlns="http://www.tei-c.org/ns/1.0">'
in
annotations
:
annotations
=
TEItoTab
(
annotations
)
ws_url
=
"http://vihar.ijs.si:8081
/patDefSent"
ws_url
=
webservice_def_ex_url
+
"
/patDefSent"
params
=
{
"corpus"
:
annotations
,
"pattern"
:
pattern
,
"lang"
:
lang
}
...
...
@@ -580,7 +581,7 @@ def nlp_def_extraction_terms2(input_dict):
if
'<TEI xmlns="http://www.tei-c.org/ns/1.0">'
in
annotations
:
annotations
=
TEItoTab
(
annotations
)
ws_url
=
"http://vihar.ijs.si:8081
/termDefSent"
ws_url
=
webservice_def_ex_url
+
"
/termDefSent"
params
=
{
"corpus"
:
annotations
,
"candidates"
:
term_candidates
,
"lang"
:
lang
,
...
...
@@ -622,7 +623,7 @@ def nlp_def_extraction_wnet2(input_dict):
if
'<TEI xmlns="http://www.tei-c.org/ns/1.0">'
in
annotations
:
annotations
=
TEItoTab
(
annotations
)
ws_url
=
"http://vihar.ijs.si:8081
/wnetDefSent"
ws_url
=
webservice_def_ex_url
+
"
/wnetDefSent"
params
=
{
"corpus"
:
annotations
,
"lang"
:
lang
}
response
=
post
(
ws_url
,
params
=
params
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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