Commit 0cea4e54 authored by Janez K's avatar Janez K

dodal arff string to orange data table

parent dbe2455e
......@@ -2199,6 +2199,62 @@
"name": "Utilities"
}
},
{
"pk": 99,
"model": "workflows.abstractwidget",
"fields": {
"category": 13,
"treeview_image": "",
"name": "ARFF string to Orange Data Table",
"is_streaming": false,
"uid": "d978d9ba-40dc-427e-b16f-066f13ada8e5",
"interaction_view": "",
"image": "",
"package": "cforange",
"static_image": "",
"post_interact_action": "",
"user": null,
"visualization_view": "",
"action": "load_dataset_from_arff_string",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"has_progress_bar": false,
"order": 1,
"description": ""
}
},
{
"pk": 189,
"model": "workflows.abstractinput",
"fields": {
"widget": 99,
"name": "Arff string",
"short_name": "arf",
"uid": "",
"default": "",
"required": false,
"multi": false,
"parameter_type": null,
"variable": "arff",
"parameter": false,
"order": 1,
"description": ""
}
},
{
"pk": 111,
"model": "workflows.abstractoutput",
"fields": {
"widget": 99,
"name": "Orange Data Table",
"short_name": "odt",
"variable": "dataset",
"uid": "",
"order": 1,
"description": ""
}
},
{
"pk": 57,
"model": "workflows.abstractwidget",
......
......@@ -563,6 +563,16 @@ def load_dataset(input_dict):
output_dict = {}
output_dict['dataset'] = orange.ExampleTable(input_dict['file'])
return output_dict
def load_dataset_from_arff_string(input_dict):
import orange
import tempfile
f = tempfile.NamedTemporaryFile(delete=False,suffix='.arff')
f.write(input_dict['arff'])
f.close()
output_dict = {}
output_dict['dataset'] = orange.ExampleTable(f.name)
return output_dict
# SATURATION NOISE FILTER
......
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