import sys
import wx
import wx.lib.mixins.listctrl as listmix
-from tabsimi import DoSimi
+#from tabsimi import DoSimi
from listlex import ListForSpec
from chemins import ConstructPathOut, ffr
from dialog import PrefExport, PrefUCECarac, SearchDial, message
vchistable = [line[1:] for line in chistable]
fchistable = [line[0] for line in chistable]
word = self.getselectedwords()[0]
+ print self.var_mod
if len(word.split('_')) > 1 :
var = word.split('_')
- words = ['_'.join([var[0],word]) for word in self.var_mod[var[0]]]
+ #words = ['_'.join([var[0],word]) for word in self.var_mod[var[0]]]
+ words = [word for word in self.var_mod[var[0]]]
words.sort()
tableout = []
kwords = []
for word in words :
+ print word
if word in fchistable :
tableout.append(vchistable[fchistable.index(word)])
kwords.append(word)
tmpgraph = tempfile.mktemp(dir=self.Source.parent.TEMPDIR)
+ print tableout
txt = barplot(tableout, kwords, title, self.Source.parent.RscriptsPath['Rgraph'], tmpgraph)
tmpscript = tempfile.mktemp(dir=self.Source.parent.TEMPDIR)
file = open(tmpscript,'w')
def quest_simi(self, evt) :
tableau = self.Source.tableau
tab = tableau.make_table_from_classe(self.cl, self.la)
- pathout = ConstructPathOut(os.path.join(self.Source.pathout, 'simi_classe_%i' %self.cl))
+ pathout = ConstructPathOut(os.path.join(self.Source.pathout.dirout, 'simi_classe_%i' %self.cl), 'simi_classe_%i' %self.cl)
self.filename = os.path.join(pathout,'mat01.csv')
tableau.printtable(self.filename, tab)
del tab
paramsimi = {'coeff' : 0,
'layout' : 2,
- 'type' : 1,
+ 'type_graph' : 1,
'arbremax' : 1,
'coeff_tv' : 1,
'coeff_tv_nb' : 0,
'keep_coord' : True,
'alpha' : 20,
'film': False,
+ 'com' : 0,
+ 'communities' : 0,
+ 'halo' : 0
}
# self.tableau.actives = {}
# self.tableau.lchi = self.lchi
# self.tableau.chi[val] = [self.lchi[i]]
act = {}
- self.tableau.chi = {}
- self.tableau.lchi = self.lchi
- self.tableau.parametre['fromprof'] = True
+ tableau.chi = {}
+ tableau.lchi = self.lchi
+ tableau.parametre['fromprof'] = True
for i, val in enumerate(self.la) :
act[val] = [self.lfreq[i]]
- self.tableau.chi[val] = [self.lchi[i]]
- DoSimi(self, param = paramsimi, fromprof = ffr(self.filename), pathout = pathout, listactives = self.la, actives = act)
+ tableau.chi[val] = [self.lchi[i]]
+ self.parent.SimiCluster(parametres = paramsimi, fromprof = ffr(self.filename), pathout = pathout, listactives = self.la, actives = act, tableau = tableau)
def onwordgraph(self, evt):
word = self.getColumnText(self.GetFirstSelected(), 6)
'lem' : self.Source.parametres['lem'],
'tmpchi' : self.tmpchi}
#try :
- self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
+ self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
#except :
# print 'not acitve'
'lem' : self.Source.parametres['lem'],
'tmpchi' : self.tmpchi}
- self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
+ self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
#dlg = progressbar(self, 2)
#corpus = self.Source.corpus
#uces = corpus.lc[self.cl-1]