Commit 936450f0 authored by Janez's avatar Janez

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

parents 42515a21 34b5f041
......@@ -69,32 +69,38 @@ def lwlr_fit_predict(input_dict):
return {"string": predictions_url}
def dt_fit(input_dict):
from discomll.ensemble import decision_trees
from discomll.ensemble import forest_distributed_decision_trees
random_state = None if input_dict["seed"] == "None" else int(input_dict["seed"])
bootstrap = input_dict["bootstrap"] == "true"
fitmodel_url = decision_trees.fit(input = input_dict["dataset"],
fitmodel_url = forest_distributed_decision_trees.fit(input = input_dict["dataset"],
max_tree_nodes = input_dict["tree_nodes"],
leaf_min_inst = input_dict["leaf_min_inst"],
min_samples_leaf = input_dict["min_samples_leaf"],
min_samples_split = input_dict["min_samples_split"],
class_majority = input_dict["majority"],
measure = input_dict["measure"],
split_fun = input_dict["split_fun"],
bootstrap = bootstrap,
measure = input_dict["measure"],
accuracy = input_dict["accuracy"],
separate_max = input_dict["separate_max"],
random_state = random_state,
save_results = True)
return {"fitmodel_url" : fitmodel_url}
def dt_predict(input_dict):
from discomll.ensemble import decision_trees
from discomll.ensemble import forest_distributed_decision_trees
predictions_url = decision_trees.predict(input_dict["dataset"],
predictions_url = forest_distributed_decision_trees.predict(input_dict["dataset"],
fitmodel_url = input_dict["fitmodel_url"],
save_results = True)
return {"string": predictions_url}
def rf_fit(input_dict):
from discomll.ensemble import random_forest
from discomll.ensemble import distributed_random_forest
random_state = None if input_dict["seed"] == "None" else int(input_dict["seed"])
fitmodel_url = random_forest.fit(input = input_dict["dataset"],
fitmodel_url = distributed_random_forest.fit(input = input_dict["dataset"],
trees_per_chunk = input_dict["trees_per_subset"],
max_tree_nodes = input_dict["tree_nodes"],
leaf_min_inst = input_dict["leaf_min_inst"],
......@@ -107,11 +113,11 @@ def rf_fit(input_dict):
return {"fitmodel_url" : fitmodel_url}
def rf_predict(input_dict):
from discomll.ensemble import random_forest
from discomll.ensemble import distributed_random_forest
random_state = None if input_dict["seed"] == "None" else int(input_dict["seed"])
predictions_url = random_forest.predict(input = input_dict["dataset"],
predictions_url = distributed_random_forest.predict(input = input_dict["dataset"],
fitmodel_url = input_dict["fitmodel_url"],
diff = input_dict["diff"],
random_state = random_state,
......@@ -119,11 +125,11 @@ def rf_predict(input_dict):
return {"string": predictions_url}
def wrf_fit(input_dict):
from discomll.ensemble import weighted_forest
from discomll.ensemble import distributed_weighted_forest
random_state = None if input_dict["seed"] == "None" else int(input_dict["seed"])
fitmodel_url = weighted_forest.fit(input = input_dict["dataset"],
fitmodel_url = distributed_weighted_forest.fit(input = input_dict["dataset"],
trees_per_chunk = input_dict["trees_per_subset"],
max_tree_nodes = input_dict["tree_nodes"],
leaf_min_inst = input_dict["leaf_min_inst"],
......@@ -135,9 +141,9 @@ def wrf_fit(input_dict):
return {"fitmodel_url" : fitmodel_url}
def wrf_predict(input_dict):
from discomll.ensemble import weighted_forest
from discomll.ensemble import distributed_weighted_forest
predictions_url = weighted_forest.predict(input = input_dict["dataset"],
predictions_url = distributed_weighted_forest.predict(input = input_dict["dataset"],
fitmodel_url = input_dict["fitmodel_url"],
save_results = True)
return {"string": predictions_url}
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "Random forest with MapReduce\r\n\r\nFit phase\r\nRandom forest algorithm builds multiple decision trees with a bootstrap method on a subset of data. \r\nIn each tree node, it estimates sqrt(num. of attributes)+1 randomly selected attributes (without replacement).\r\nAll decision trees are merged in large ensemble. \r\n\r\nPredict phase\r\nAlgorithm queries as many trees as needed for reliable prediction.\r\nFirstly, it randomly chooses without replacement 15 trees. If all trees vote for the same class, it outputs prediction. If there are multiple classes predicted, it chooses 15 trees again. Algorithm calculates difference in probability between most and second most probable prediction. If difference is greater than parameter diff, it outputs prediction. If a test sample is hard to predict (difference is never higher than diff), it queries whole ensemble to make a prediction.\r\n\r\nReference\r\nSimilar algorithm is proposed in: Justin D Basilico, M Arthur Munson, Tamara G Kolda, Kevin R Dixon, and W Philip Kegelmeyer. Comet: A recipe for learning and using large ensembles on massive data. \r\n",
"description": "Distributed Random Forest\r\n\r\nFit phase\r\nRandom forest algorithm builds multiple decision trees with a bootstrap method on a subset of data. \r\nIn each tree node, it estimates sqrt(num. of attributes)+1 randomly selected attributes (without replacement).\r\nAll decision trees are merged in large ensemble. \r\n\r\nPredict phase\r\nAlgorithm queries as many trees as needed for reliable prediction.\r\nFirstly, it randomly chooses without replacement 15 trees. If all trees vote for the same class, it outputs prediction. If there are multiple classes predicted, it chooses 15 trees again. Algorithm calculates difference in probability between most and second most probable prediction. If difference is greater than parameter diff, it outputs prediction. If a test sample is hard to predict (difference is never higher than diff), it queries whole ensemble to make a prediction.\r\n\r\nReference\r\nSimilar algorithm is proposed in: Justin D Basilico, M Arthur Munson, Tamara G Kolda, Kevin R Dixon, and W Philip Kegelmeyer. Comet: A recipe for learning and using large ensembles on massive data. ",
"static_image": "",
"action": "rf_fit",
"visualization_view": "",
......@@ -21,7 +21,7 @@
"interactive": false,
"windows_queue": false,
"order": 1,
"name": "Random forest"
"name": "Distributed Random Forest"
}
},
{
......@@ -37,7 +37,7 @@
"parameter_type": "select",
"variable": "split_fun",
"parameter": true,
"order": 8,
"order": 7,
"uid": "00758cdf-2eb5-43c5-bedf-bd3b8b9c29d6"
}
},
......@@ -54,7 +54,7 @@
"parameter_type": "text",
"variable": "tree_nodes",
"parameter": true,
"order": 4,
"order": 3,
"uid": "5a915d8b-2c99-4661-aa20-325709b61b6b"
}
},
......@@ -88,7 +88,7 @@
"parameter_type": "select",
"variable": "measure",
"parameter": true,
"order": 7,
"order": 6,
"uid": "68cbccf9-7469-4b55-b96e-4f7c6a3c9cde"
}
},
......@@ -105,7 +105,7 @@
"parameter_type": "text",
"variable": "seed",
"parameter": true,
"order": 9,
"order": 8,
"uid": "8e6e2d96-3457-4b23-ac93-ab90b083920f"
}
},
......@@ -122,7 +122,7 @@
"parameter_type": "text",
"variable": "trees_per_subset",
"parameter": true,
"order": 3,
"order": 2,
"uid": "a0b28dbe-1cb8-4987-958e-e4d379c8d2ff"
}
},
......@@ -139,7 +139,7 @@
"parameter_type": "text",
"variable": "leaf_min_inst",
"parameter": true,
"order": 5,
"order": 4,
"uid": "a2f366a9-af74-4b3f-90ed-33c1fcad4c3a"
}
},
......@@ -156,7 +156,7 @@
"parameter_type": "text",
"variable": "majority",
"parameter": true,
"order": 6,
"order": 5,
"uid": "fe7f5d5a-c2e2-4ae9-b138-18b1de7c4e93"
}
},
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "Weighted forest with MapReduce\r\n\r\nWeighted forest is a novel ensemble algorithm. \r\n\r\nFit phase\r\nWeighted forest algorithm builds multiple decision trees with a bootstrap method on a subset of data. In each tree node, it estimates sqrt(num. of attributes)+1 randomly selected attributes (without replacement). It uses decision tree to predict out-of-bag samples. For each prediction of an out-of-bag sample, it measures margin (classifier confidence in prediction) and leaf identifier that outputs prediction. Algorithm uses similarity matrix, where it stores similarities for each out-of-bag sample that was predicted with the same leaf. We assume that samples are similar, if the same leaf predicts them multiple times in multiple decision trees. \r\nAfter algorithm builds all decision trees, it passes similarity matrix to k-medoids algorithm. Similarity matrix presents distances between test samples. We set parameter k as sqrt(num. of attributes)+1. k-medoids algorithm outputs medoids, which are test samples in the cluster centers of the dataset. Medoids are actual samples in a dataset, unlike centroids which are centers of clusters. Algorithm measures average margin for all samples that are in the cluster of certain medoid. It saves the average margin of a decision tree in its model. Algorithm uses this scores as weights of decision trees in predict phase.\r\nAlgorithm builds a forest on each subset of the data and it merges them in large ensemble. Each forest has its own medoids.\r\n\r\nPredict phase \r\nAlgorithm selects a forest (or more, if it finds equal similarities with medoids in multiple forests), that contain most similar medoid with a test sample. Then it uses the same procedure like with small data. Algorithm calculates Gower similarity coefficient with a test sample and every medoid. Only decision trees with high margin on similar test samples output prediction and algorithm stores decision tree margin for each prediction. Algorithm calculates final values for each prediction: (number of margins) * avg(margins) and it selects prediction with highest value.",
"description": "Distributed Weighted Forest\r\n\r\nWeighted forest is a novel ensemble algorithm. \r\n\r\nFit phase\r\nWeighted forest algorithm builds multiple decision trees with a bootstrap method on a subset of data. In each tree node, it estimates sqrt(num. of attributes)+1 randomly selected attributes (without replacement). It uses decision tree to predict out-of-bag samples. For each prediction of an out-of-bag sample, it measures margin (classifier confidence in prediction) and leaf identifier that outputs prediction. Algorithm uses similarity matrix, where it stores similarities for each out-of-bag sample that was predicted with the same leaf. We assume that samples are similar, if the same leaf predicts them multiple times in multiple decision trees. \r\nAfter algorithm builds all decision trees, it passes similarity matrix to k-medoids algorithm. Similarity matrix presents distances between test samples. We set parameter k as sqrt(num. of attributes)+1. k-medoids algorithm outputs medoids, which are test samples in the cluster centers of the dataset. Medoids are actual samples in a dataset, unlike centroids which are centers of clusters. Algorithm measures average margin for all samples that are in the cluster of certain medoid. It saves the average margin of a decision tree in its model. Algorithm uses this scores as weights of decision trees in predict phase.\r\nAlgorithm builds a forest on each subset of the data and it merges them in large ensemble. Each forest has its own medoids.\r\n\r\nPredict phase \r\nAlgorithm selects a forest (or more, if it finds equal similarities with medoids in multiple forests), that contain most similar medoid with a test sample. Then it uses the same procedure like with small data. Algorithm calculates Gower similarity coefficient with a test sample and every medoid. Only decision trees with high margin on similar test samples output prediction and algorithm stores decision tree margin for each prediction. Algorithm calculates final values for each prediction: (number of margins) * avg(margins) and it selects prediction with highest value.",
"static_image": "",
"action": "wrf_fit",
"visualization_view": "",
......@@ -21,7 +21,7 @@
"interactive": false,
"windows_queue": false,
"order": 1,
"name": "Weighted forest"
"name": "Distributed Weighted Forest"
}
},
{
......@@ -37,7 +37,7 @@
"parameter_type": "text",
"variable": "majority",
"parameter": true,
"order": 6,
"order": 5,
"uid": "1b23ead1-b104-4d27-a6fd-b23de6efa28f"
}
},
......@@ -54,7 +54,7 @@
"parameter_type": "text",
"variable": "seed",
"parameter": true,
"order": 9,
"order": 8,
"uid": "31c68e34-3bff-41bb-bf77-925c6171a6f6"
}
},
......@@ -88,7 +88,7 @@
"parameter_type": "text",
"variable": "tree_nodes",
"parameter": true,
"order": 4,
"order": 3,
"uid": "3d48b0d0-a304-45d5-9d18-3ca17e8fcf05"
}
},
......@@ -105,7 +105,7 @@
"parameter_type": "text",
"variable": "trees_per_subset",
"parameter": true,
"order": 3,
"order": 2,
"uid": "8770ace6-4968-47cf-b7cc-4ad8bfff303c"
}
},
......@@ -122,7 +122,7 @@
"parameter_type": "select",
"variable": "measure",
"parameter": true,
"order": 7,
"order": 6,
"uid": "9a8f3c2c-265c-4b37-93c1-d58fee9dd7af"
}
},
......@@ -139,7 +139,7 @@
"parameter_type": "text",
"variable": "leaf_min_inst",
"parameter": true,
"order": 5,
"order": 4,
"uid": "ac032f38-f4a4-44ea-8c02-96506d4f8e86"
}
},
......@@ -156,7 +156,7 @@
"parameter_type": "select",
"variable": "split_fun",
"parameter": true,
"order": 8,
"order": 7,
"uid": "c43bfc92-e1af-42fc-8d73-f7348ebdaf40"
}
},
......
......@@ -10,7 +10,7 @@
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "Decision trees with MapReduce\r\n\r\nFit phase\r\nDecision trees algorithm builds one decision tree on a subset of data and it estimates all attributes in every tree node.\r\n\r\nPredict phase\r\nEach tree votes and algorithm selects prediction with most votes.\r\n\r\nReference\r\nSimilar algorithm is proposed in Gongqing Wu, Haiguang Li, Xuegang Hu, Yuanjun Bi, Jing Zhang, and Xindong Wu. MRec4.5: C4. 5 ensemble classification with mapreduce.",
"description": "Forest of Distributed Decision Trees\r\n\r\nFit phase\r\nThe forest of Distributed Decision Trees constructs decision tree on a subset of data and it estimates all attributes in every tree node.\r\n\r\nPredict phase\r\nEach tree votes and algorithm selects prediction with most votes.\r\n\r\nReference\r\nSimilar algorithm is proposed in Gongqing Wu, Haiguang Li, Xuegang Hu, Yuanjun Bi, Jing Zhang, and Xindong Wu. MRec4.5: C4. 5 ensemble classification with mapreduce.",
"static_image": "",
"action": "dt_fit",
"visualization_view": "",
......@@ -21,7 +21,7 @@
"interactive": false,
"windows_queue": false,
"order": 1,
"name": "Decision trees"
"name": "Forest of Distributed Decision Trees"
}
},
{
......@@ -41,6 +41,23 @@
"uid": "0351b517-61f1-4856-8ee4-1acd7d04d599"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Bootstrap sampling",
"short_name": "bsm",
"default": "true",
"description": "Bootstrap sampling",
"required": true,
"multi": false,
"parameter_type": "checkbox",
"variable": "bootstrap",
"parameter": true,
"order": 4,
"uid": "1df56f50-06f3-4486-ae5b-988a5cf48b92"
}
},
{
"model": "workflows.abstractinput",
"fields": {
......@@ -54,7 +71,7 @@
"parameter_type": "select",
"variable": "measure",
"parameter": true,
"order": 6,
"order": 7,
"uid": "28f53666-76b0-4d44-acab-0824e603a848"
}
},
......@@ -62,17 +79,51 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Discretization",
"short_name": "spf",
"default": "equal_freq",
"description": "Select equal frequency discretization or random discretization for numeric attributes",
"name": "Random state",
"short_name": "rst",
"default": "None",
"description": "",
"required": true,
"multi": false,
"parameter_type": "select",
"variable": "split_fun",
"parameter_type": "text",
"variable": "seed",
"parameter": true,
"order": 7,
"uid": "8b88d56c-6cbb-451f-a618-4a1a27993a90"
"order": 10,
"uid": "40bc0e36-427f-4517-ac56-55ef033a0e9c"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Discretization accuracy",
"short_name": "dac",
"default": "1",
"description": "Continuous attributes are converted to discrete intervals. For exact estimation use 0 (slowest) or increase the number to get an approximation (faster).",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "accuracy",
"parameter": true,
"order": 8,
"uid": "45a0c36c-d61a-4708-b54a-6908494ee090"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Min samples in leaf",
"short_name": "msl",
"default": "5",
"description": "The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then min samples leaf samples",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "min_samples_leaf",
"parameter": true,
"order": 5,
"uid": "739e0f16-2ac9-423e-8050-58778553ca48"
}
},
{
......@@ -81,7 +132,7 @@
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Max tree nodes",
"short_name": "mtn",
"default": "20",
"default": "100",
"description": "Max. number of decision tree nodes.",
"required": true,
"multi": false,
......@@ -96,19 +147,53 @@
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Min samples split",
"name": "Trees per subset",
"short_name": "tps",
"default": "20",
"description": "Number of trees per subset of data",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "trees_per_subset",
"parameter": true,
"order": 2,
"uid": "c3428a84-4bc2-404d-b411-99091101a4ff"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Min samples to split",
"short_name": "lmi",
"default": "5",
"description": "Min. number of samples to split the node",
"default": "10",
"description": "The minimum number of samples required to split an internal node",
"required": true,
"multi": false,
"parameter_type": "text",
"variable": "leaf_min_inst",
"variable": "min_samples_split",
"parameter": true,
"order": 4,
"order": 5,
"uid": "cde1d8a0-c312-4497-a07b-43f7cd7f95e2"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "74df0d6e-684f-46ae-975d-ba1ce5425066",
"name": "Separate most present class",
"short_name": "smp",
"default": "true",
"description": "",
"required": true,
"multi": false,
"parameter_type": "checkbox",
"variable": "separate_max",
"parameter": true,
"order": 9,
"uid": "eac59b1f-c35d-4116-b4d7-9320d2b4b351"
}
},
{
"model": "workflows.abstractinput",
"fields": {
......@@ -122,7 +207,7 @@
"parameter_type": "text",
"variable": "majority",
"parameter": true,
"order": 5,
"order": 6,
"uid": "f31f0f86-238b-4ce1-b7e7-1ad6e88f55b0"
}
},
......@@ -155,23 +240,5 @@
"value": "mdl",
"abstract_input": "28f53666-76b0-4d44-acab-0824e603a848"
}
},
{
"model": "workflows.abstractoption",
"fields": {
"name": "Equal frequency discretization",
"uid": "dac3dd38-3a6c-408b-9135-77cb4380d543",
"value": "equal_freq",
"abstract_input": "8b88d56c-6cbb-451f-a618-4a1a27993a90"
}
},
{
"model": "workflows.abstractoption",
"fields": {
"name": "Random discretization",
"uid": "dafe6b7c-48e7-4cfb-a0aa-2b22788fceec",
"value": "random",
"abstract_input": "8b88d56c-6cbb-451f-a618-4a1a27993a90"
}
}
]
\ No newline at end of file
This diff is collapsed.
......@@ -4,6 +4,8 @@ NLP common functions.
@author: Anze Vavpetic, 2012
'''
import xml.etree.ElementTree as xml
import re
def parse_def_sentences(sentsXML):
"""
......@@ -17,6 +19,20 @@ def parse_def_sentences(sentsXML):
sentences = sorted(sentences, key = lambda x: x['id'])
return sentences
def parse_def_sentences2(sentsXML):
"""
Parses the candidate definition sentences from the input XML string.
"""
dom = xml.fromstring(sentsXML)
sents = dom.findall('S') # Lists all the tagged sentences
sentences = {}
for sent in sents:
text = sent.text.strip().replace(" ,", ",").replace(" .", ".").replace(" !", "!").replace(" ?", "?").replace("( ", "(").replace(" )", ")").replace("[ ", "[").replace(" ]", "]")
sentences[text] = {'id' : sent.attrib['id'], 'aid' : sent.attrib['aid'], 'txt' : text}
sentences = sorted(sentences.values(), key = lambda x: x['id'])
return sentences
def sentences_to_xml(sentences):
root = xml.Element('definitions')
for sent in sentences:
......@@ -24,6 +40,15 @@ def sentences_to_xml(sentences):
el.text = sent['txt']
root.append(el)
return xml.tostring(root, "UTF-8")
def sentences_to_xml2(sentences):
root = xml.Element('definitions')
for sent in sentences:
el = xml.Element('S', attrib={'id' : sent['id'], 'aid' : sent['aid']})
el.text = sent['txt']
root.append(el)
return xml.tostring(root, "UTF-8")
if __name__ == '__main__':
......
......@@ -64,7 +64,7 @@
"widget": "27273666-764d-458d-9513-0715ba2e6b4d",
"name": "Language",
"short_name": "lan",
"default": "sl",
"default": "en",
"description": "Language",
"required": true,
"multi": false,
......
......@@ -24,30 +24,13 @@
"name": "ToTrTaLe2"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "4eec620e-f919-47d5-99f9-846ada308ac2",
"name": "Antique slovenian",
"short_name": "atq",
"default": "false",
"description": "Antique slovenian",
"required": false,
"multi": false,
"parameter_type": "checkbox",
"variable": "antique",
"parameter": true,
"order": 6,
"uid": "161bece4-5e34-4f47-821c-ffbb35f6069a"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "4eec620e-f919-47d5-99f9-846ada308ac2",
"name": "Language",
"short_name": "lng",
"default": "sl",
"default": "en",
"description": "Language of the input corpus",
"required": true,
"multi": false,
......@@ -109,23 +92,6 @@
"uid": "b9d70de4-156d-45da-aece-5adf08122a5c"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "4eec620e-f919-47d5-99f9-846ada308ac2",
"name": "Bohoricica",
"short_name": "boh",
"default": "false",
"description": "Bohoricica",
"required": false,
"multi": false,
"parameter_type": "checkbox",
"variable": "bohoricica",
"parameter": true,
"order": 5,
"uid": "f429eb2c-a5ac-44b8-a691-602c97a2b0da"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
......@@ -138,6 +104,24 @@
"uid": "20f014a4-127a-4153-8c2e-1d32dd0b2343"
}
},
{
"model": "workflows.abstractoption",
"fields": {
"name": "Historical Slovene (Bohori\u010d)",
"uid": "",
"value": "boho",
"abstract_input": "1f55805e-08de-4fe0-8bc9-3896da7cbcfd"
}
},
{
"model": "workflows.abstractoption",
"fields": {
"name": "Historical Slovene (Gaj)",
"uid": "",
"value": "gaji",
"abstract_input": "1f55805e-08de-4fe0-8bc9-3896da7cbcfd"
}
},
{
"model": "workflows.abstractoption",
"fields": {
......
......@@ -81,7 +81,7 @@
"widget": "5c7768f9-4449-469b-bae1-f56e9e48be34",
"name": "Language",
"short_name": "lan",
"default": "sl",
"default": "en",
"description": "Language",
"required": true,
"multi": false,
......
[
{
"model": "workflows.abstractwidget",
"fields": {
"category": "9a30eafc-37b8-48f2-8a92-692c4b324dff",
"treeview_image": "",
"uid": "67a826ea-8d08-43f7-9a3d-12e99b1428a4",
"is_streaming": false,
"package": "nlp",
"interaction_view": "",
"has_progress_bar": false,
"image": "",
"description": "",
"static_image": "nlp.png",
"action": "merge_sentences2",
"visualization_view": "",
"streaming_visualization_view": "",
"post_interact_action": "",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"windows_queue": false,
"order": 1,
"name": "Merge sentences2"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "67a826ea-8d08-43f7-9a3d-12e99b1428a4",
"name": "Sentences",
"short_name": "sen",
"default": "",
"description": "",
"required": true,
"multi": true,
"parameter_type": null,
"variable": "sentences",
"parameter": false,
"order": 1,
"uid": "c3ffb24f-2c43-4272-ba69-19121cbe11b8"
}
},
{
"model": "workflows.abstractinput",
"fields": {
"widget": "67a826ea-8d08-43f7-9a3d-12e99b1428a4",
"name": "Method",
"short_name": "mth",
"default": "union",
"description": "",
"required": true,
"multi": false,
"parameter_type": "select",
"variable": "method",
"parameter": true,
"order": 1,
"uid": "cf6fa968-c2cc-47f3-a885-2035d75f4e4f"
}
},
{
"model": "workflows.abstractoutput",
"fields": {
"widget": "67a826ea-8d08-43f7-9a3d-12e99b1428a4",
"name": "Merged Sentences",
"short_name": "sen",
"description": "",
"variable": "merged_sentences",
"order": 1,
"uid": "e233225c-cae5-48c7-b3f6-30f7651759cc"
}
},
{