Commit c95b9f2c authored by Matic Perovšek's avatar Matic Perovšek

wordification 2.0 in ostali popravki

parent e395f498
......@@ -181,7 +181,7 @@ INSTALLED_APPS_CONCUR = (
INSTALLED_APPS_WORKFLOWS_SUB = (
'workflows.base',
#'workflows.latino',
'workflows.latino',
'workflows.decision_support',
'workflows.segmine',
'workflows.subgroup_discovery',
......@@ -192,8 +192,8 @@ INSTALLED_APPS_WORKFLOWS_SUB = (
'workflows.cforange',
'workflows.perfeval',
'workflows.mysql',
#'workflows.lemmagen',
#'workflows.crossbee',
'workflows.lemmagen',
'workflows.crossbee',
'workflows.scikitAlgorithms',
#'workflows.lemmagen',
#'workflows.crossbee',
......
Django==1.4.1
PIL==1.1.7
Pillow==2.2.1
PySimpleSOAP==1.05a
South==0.7.6
Werkzeug==0.8.3
......@@ -12,10 +12,10 @@ mysql-connector-python==1.0.12
numpy==1.7.1
pydot==1.0.28
pyparsing==1.5.7
scikit-learn==0.13
scipy==0.12.0
scikit-learn==0.14.1
scipy==0.13.0
feedparser==5.1.2
networkx==1.7
networkx==1.8.1
unidecode==0.04.13
nltk==2.0.4
......@@ -91,8 +91,17 @@ def ilp_wordification(input_dict):
other_tables = input_dict.get('other_tables', None)
context = input_dict.get('context', None)
word_att_length = int(input_dict.get('f_ngram_size', 1))
wordification = Wordification(target_table,other_tables,context,word_att_length)
return {'corpus' : wordification.wordify()}
for _ in range(1):
wordification = Wordification(target_table,other_tables,context,word_att_length)
wordification.run(1)
wordification.calculate_tf_idfs(True)
#wordification.prune(50)
#wordification.to_arff()
#from wordification import Wordification_features_test
#wft=Wordification_features_test(target_table,other_tables,context)
#wft.print_results()
return {'arff' : wordification.to_arff(),'corpus': wordification.wordify()}
def ilp_treeliker(input_dict):
......
from wordification import Wordification
#from wordification_features_text import Wordification_features_test
......@@ -14,7 +14,7 @@ def add_multiple(input_dict):
output_dict = {}
output_dict['sum'] = 0
for i in input_dict['integer']:
output_dict['sum'] = int(i)+output_dict['sum']
output_dict['sum'] = float(i)+output_dict['sum']
return output_dict
def load_file(input_dict):
......
......@@ -68,6 +68,8 @@ class DBContext:
self.connected[(table, ref_table)].append((col, 'id'))
self.connected[(ref_table, table)].append(('id', col))
self.fkeys[table].add(col)
self.reverse_fkeys[(table, col)] = ref_table
if col == 'id':
self.pkeys[table] = col
for (table, col, ref_table, ref_col) in cursor:
......
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