From: pierre Date: Mon, 3 Nov 2014 22:50:31 +0000 (+0100) Subject: Merge branch 'master' of http://www.iramuteq.org/git/iramuteq X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=commitdiff_plain;h=53df4af897991ea260f0b57e4b0f7826f6409860;hp=9ba3d2c5c6c49439c8b2ff4ae6bd7a632146850a Merge branch 'master' of iramuteq.org/git/iramuteq --- diff --git a/PrintRScript.py b/PrintRScript.py index a4ed14d..90a4398 100644 --- a/PrintRScript.py +++ b/PrintRScript.py @@ -33,7 +33,7 @@ class PrintRScript : def sources(self, lsources) : for source in lsources : - self.add('source("%s", encoding = \'utf8\')' % source) + self.add('source("%s", encoding = \'utf8\')' % ffr(source)) def packages(self, lpks) : for pk in lpks : @@ -41,7 +41,7 @@ class PrintRScript : def load(self, l) : for val in l : - self.add('load("%s")' % val) + self.add('load("%s")' % ffr(val)) def write(self) : with open(self.scriptout, 'w') as f : @@ -169,10 +169,6 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv txt += """ chd2<-CHD(data2, x = nbt, mode.patate = mode.patate, svd.method = svd.method, libsvdc.path = libsvdc.path) """ - else: - txt += """ - chd2<-chd1 - """ txt += """ #lecture des uce @@ -203,8 +199,10 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv } n1 <- chd.result$n1 classeuce1 <- chd.result$cuce1 - classeuce2 <- chd.result$cuce2 - """ % (classif_mode, mincl, DicoPath['uce']) + classes<-n1[,ncol(n1)] + write.csv2(n1, file="%s") + rm(n1) + """ % (classif_mode, mincl, DicoPath['uce'], DicoPath['n1.csv']) txt += """ tree.tot1 <- make_tree_tot(chd1) @@ -215,6 +213,7 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv if classif_mode == 0: txt += """ + classeuce2 <- chd.result$cuce2 tree.tot2 <- make_tree_tot(chd2) # open_file_graph("%s", width = 600, height=400) # plot(tree.tot2$tree.cl) @@ -224,7 +223,7 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv txt += """ tree.cut1 <- make_dendro_cut_tuple(tree.tot1$dendro_tuple, chd.result$coord_ok, classeuce1, 1, nbt) save(tree.cut1, file="%s") - classes<-n1[,ncol(n1)] + open_file_graph("%s", width = 600, height=400) plot.dendropr(tree.cut1$tree.cl,classes, histo=TRUE) open_file_graph("%s", width = 600, height=400) @@ -244,8 +243,10 @@ def RchdTxt(DicoPath, RscriptPath, mincl, classif_mode, nbt = 9, svdmethod = 'sv """ % (DicoPath['dendro2'], DicoPath['arbre2']) txt += """ - save.image(file="%s") - """ % DicoPath['RData'] + + #save.image(file="%s") + """ % (DicoPath['RData']) + fileout = open(DicoPath['Rchdtxt'], 'w') fileout.write(txt) fileout.close() @@ -322,8 +323,9 @@ def AlcesteTxtProf(DictChdTxtOut, RscriptsPath, clnb, taillecar): txt = "clnb<-%i\n" % clnb txt += """ source("%s") -load("%s") -""" % (RscriptsPath['chdfunct'], DictChdTxtOut['RData']) +#load("%s") +n1 <- read.csv2("%s") +""" % (RscriptsPath['chdfunct'], DictChdTxtOut['RData'], DictChdTxtOut['n1.csv']) txt += """ dataact<-read.csv2("%s", header = FALSE, sep = ';',quote = '\"', row.names = 1, na.strings = 'NA') datasup<-read.csv2("%s", header = FALSE, sep = ';',quote = '\"', row.names = 1, na.strings = 'NA') @@ -707,7 +709,7 @@ class PrintSimiScript(PrintRScript) : dm.path <- "%s" cn.path <- "%s" selected.col <- "%s" - """ % (self.pathout['mat01.csv'], self.pathout['actives.csv'], self.pathout['selected.csv']) + """ % (ffr(self.pathout['mat01.csv']), ffr(self.pathout['actives.csv']), ffr(self.pathout['selected.csv'])) if 'word' in self.parametres : txt += """ word <- TRUE @@ -742,7 +744,7 @@ class PrintSimiScript(PrintRScript) : txt += """ dm.path <- "%s" selected.col <- "%s" - """ % (self.pathout['mat01.csv'], self.pathout['selected.csv']) + """ % (ffr(self.pathout['mat01.csv']), ffr(self.pathout['selected.csv'])) if 'word' in self.parametres : txt += """ word <- TRUE @@ -775,7 +777,7 @@ class PrintSimiScript(PrintRScript) : else : txt += """ load("%s") - """ % self.pathout['RData.RData'] + """ % ffr(self.pathout['RData.RData']) if self.parametres['coeff'] == 0 : method = 'cooc' @@ -931,9 +933,11 @@ class PrintSimiScript(PrintRScript) : """ txt += """ seuil <- %s - if (method!='cooc') { - seuil <- seuil/100 - } + if (!is.null(seuil)) { + if (method!='cooc') { + seuil <- seuil/100 + } + } """ % seuil txt += """ @@ -1001,7 +1005,7 @@ class PrintSimiScript(PrintRScript) : cols <- vertex.label.color chivertex.size <- norm.vec(toblack, vcexminmax[1], vcexminmax[2]) - """ % (self.analyse.parent.RscriptsPath['chdfunct']) + """ % (ffr(self.analyse.parent.RscriptsPath['chdfunct'])) else : txt += """ vertex.label.color <- 'black' @@ -1121,7 +1125,7 @@ class PrintSimiScript(PrintRScript) : } coords <- plot.simi(graph.simi, p.type='%s',filename="%s", vertex.label = label.v, edge.label = label.e, vertex.col = vertex.col, vertex.label.color = vertex.label.color, vertex.label.cex=label.cex, vertex.size = vertex.size, edge.col = cola, leg=leg, width = width, height = height, alpha = alpha, movie = film, svg = svg) save.image(file="%s") - """ % (type, self.filename, self.pathout['RData']) + """ % (type, self.filename, ffr(self.pathout['RData'])) self.add(txt) self.write() diff --git a/Rscripts/Rgraph.R b/Rscripts/Rgraph.R index 39fe618..14ce864 100644 --- a/Rscripts/Rgraph.R +++ b/Rscripts/Rgraph.R @@ -559,7 +559,7 @@ del.yellow <- function(colors) { tochange <- apply(rgbs, 2, is.yellow) tochange <- which(tochange) if (length(tochange)) { - gr.col <- grey.colors(length(tochange), start = 0.5) + gr.col <- grey.colors(length(tochange), start = 0.5, end = 0.8) } compt <- 1 for (val in tochange) { @@ -574,22 +574,23 @@ make_afc_graph <- function(toplot, classes, clnb, xlab, ylab, cex.txt = NULL, le rain <- rainbow(clnb) compt <- 1 tochange <- NULL - for (my.color in rain) { - my.color <- col2rgb(my.color) - if ((my.color[1] > 200) & (my.color[2] > 200) & (my.color[3] < 20)) { - tochange <- append(tochange, compt) - } - compt <- compt + 1 - } - if (!is.null(tochange)) { - gr.col <- grey.colors(length(tochange)) - compt <- 1 - for (val in tochange) { - rain[val] <- gr.col[compt] - compt <- compt + 1 - } - } - cl.color <- rain[classes] + #for (my.color in rain) { + # my.color <- col2rgb(my.color) + # if ((my.color[1] > 200) & (my.color[2] > 200) & (my.color[3] < 20)) { + # tochange <- append(tochange, compt) + # } + # compt <- compt + 1 + #} + #if (!is.null(tochange)) { + # gr.col <- grey.colors(length(tochange)) + # compt <- 1 + # for (val in tochange) { + # rain[val] <- gr.col[compt] + # compt <- compt + 1 + # } + #} + rain <- del.yellow(rain) + cl.color <- rain[classes] if (black) { cl.color <- 'black' } @@ -637,8 +638,9 @@ plot.dendro.prof <- function(tree, classes, chisqtable, nbbycl = 60, type.dendro vec.mat[3,] <- 3:(length(sum.cl)+2) layout(matrix(vec.mat, nrow=3, ncol=length(sum.cl)),heights=c(2,1,6)) if (! bw) { - col <- rainbow(length(sum.cl))[as.numeric(tree$tip.label)] + col <- rainbow(length(sum.cl)) col <- del.yellow(col) + col <- col[as.numeric(tree$tip.label)] colcloud <- rainbow(length(sum.cl)) colcloud <- del.yellow(colcloud) } @@ -658,7 +660,7 @@ plot.dendro.prof <- function(tree, classes, chisqtable, nbbycl = 60, type.dendro #wordcloud(names(lclasses[[i]]), lclasses[[i]], scale = c(1.5, 0.2), random.order=FALSE, colors = colcloud[i]) yval <- 1.1 plot(0,0,pch='', axes = FALSE) - vcex <- norm.vec(lclasses[[i]], 1.5, 2.5) + vcex <- norm.vec(lclasses[[i]], 1.5, 1.5) for (j in 1:length(lclasses[[i]])) { yval <- yval-(strheight( names(lclasses[[i]])[j],cex=vcex[j])+0.02) text(-0.9, yval, names(lclasses[[i]])[j], cex = vcex[j], col = colcloud[i], adj=0) @@ -796,15 +798,15 @@ plot.dendro.lex <- function(tree, to.plot, bw=FALSE, lab=NULL, lay.width=c(3,3,2 par(mar=c(0,0,0,0)) if (!is.null(classes)) { matlay <- matrix(c(1,2,3,4),1,byrow=TRUE) - lay.width <- c(3,1,3,2) + lay.width <- c(3,2,3,2) } else { matlay <- matrix(c(1,2,3),1,byrow=TRUE) } layout(matlay, widths=lay.width,TRUE) - par(mar=c(3,0,2,0),cex=1) + par(mar=c(3,0,2,4),cex=1) label.ori<-tree[[2]] if (!is.null(lab)) { - tree$tip.label <- lab + tree$tip.label <- lab[tree.order] } else { tree[[2]]<-paste('classe ',tree[[2]]) } @@ -823,7 +825,7 @@ plot.dendro.lex <- function(tree, to.plot, bw=FALSE, lab=NULL, lay.width=c(3,3,2 col.bars <- grey.colors(nrow(to.plot),0,0.8) } col <- col[tree.order] - plot.phylo(tree,label.offset=0.1,tip.col=col) + plot.phylo(tree,label.offset=0.2,tip.col=col) if (!is.null(classes)) { par(cex=0.7) par(mar=c(3,0,2,1)) diff --git a/Rscripts/chdtxt.R b/Rscripts/chdtxt.R index 8d0c290..066f968 100644 --- a/Rscripts/chdtxt.R +++ b/Rscripts/chdtxt.R @@ -95,9 +95,10 @@ Rchdtxt<-function(uceout, chd1, chd2 = NULL, mincl=0, classif_mode=0, nbt = 9) { classeuce1<-AssignClasseToUce(listuce1,chd1$n1) if (classif_mode==0) { classeuce2<-AssignClasseToUce(listuce2,chd2$n1) - } else { - classeuce2<-classeuce1 - } + } + #} else { + # classeuce2<-classeuce1 + #} #calcul des poids (effectifs) @@ -129,9 +130,9 @@ Rchdtxt<-function(uceout, chd1, chd2 = NULL, mincl=0, classif_mode=0, nbt = 9) { if (classif_mode==0) { poids2<-vector(mode='integer',length = tcl) poids2<-makepoids(classeuce2,poids2) - } else { - poids2<-poids1 - } + }# else { + # poids2<-poids1 + #} print('croisement classif') @@ -156,7 +157,11 @@ Rchdtxt<-function(uceout, chd1, chd2 = NULL, mincl=0, classif_mode=0, nbt = 9) { # } # croise # } - croise <- croiseeff( matrix(ncol=tcl,nrow=tcl), classeuce1, classeuce2) + if (classif_mode==0) { + croise <- croiseeff( matrix(ncol=tcl,nrow=tcl), classeuce1, classeuce2) + } else { + croise <- croiseeff( matrix(ncol=tcl,nrow=tcl), classeuce1, classeuce1) + } print(croise) if (classif_mode == 0) {ind <- (nbcl * 2)} else {ind <- nbcl} if (mincl==0){ @@ -217,7 +222,39 @@ Rchdtxt<-function(uceout, chd1, chd2 = NULL, mincl=0, classif_mode=0, nbt = 9) { } chicroise } - chicroise <- dochicroise(croise, mincl) + + dochicroisesimple <- function(croise, mincl) { + chicroise <- croise + for (i in 1:nrow(croise)) { + for (j in 1:ncol(croise)) { + if (croise[i,j]==0) { + chicroise[i,j]<-0 + } else if (croise[i,j]15) { - leg <- 1:length(colnames(chi$observed)) - } else { - leg <- colnames(chi$observed) - } - if (dograph) { - width<-ncol(chi$observed)*100 - if (width < 350) {width <- 350} - open_file_graph(fileout,width = width, height = 300) - par(mar=c(0,0,0,0)) - layout(matrix(c(1,2),1,2, byrow=TRUE),widths=c(3,1)) - par(mar=c(2,2,1,0)) - par(cex=0.8) - if (!bw) colors <- rainbow(length(rownames(chi$observed))) - else colors <- gray.colors(length(rownames(chi$observed))) - barplot(chi$prl,names.arg = leg, beside=TRUE,border=NA, col=colors) - par(mar=c(0,0,0,0)) - par(cex=0.8) - plot(0, axes = FALSE, pch = '') - legend(x = 'center' , rownames(chi$observed), fill = colors) - dev.off() - } - chi$prl <- cbind(chi$prl, total = rowSums(chi$prl)) - chi$prc <- rbind(chi$prc, total = colSums(chi$prc)) - chi$observed<-rbind(chi$observed,total=colSums(chi$observed)) - chi$observed<-cbind(chi$observed,total=rowSums(chi$observed)) - chi$pr <- round((chi$observed/st)*100,2) - chi$expected<-rbind(chi$expected,total=colSums(chi$expected)) - chi$expected<-cbind(chi$expected,total=rowSums(chi$expected)) - chi$expected<-round(chi$expected,digits=2) - chi$residuals<-round(chi$residuals,digits=2) - chi$contrib<-round(chi$contrib, digits=2) - nom_col<-colnames(chi$observed) - - if (ncol(chi$observed)\n - \n - \n -

Test du Chi2

\n -
-
- Légende :
- p <= 0.05
- p <= 0.05 mais il y a des valeurs théoriques < 5
- p > 0.05 -


- """%self.parent.SysEncoding - - - pretxt = '
\n'.join(links)+'


\n' - txt = '


\n'.join(['

'.join([tab[i] for tab in allhtml]) for i,val in enumerate(res)]) - txt = header + pretxt + txt + '\n' - - fileout=os.path.join(self.parametres['pathout'],'resultats-chi2.html') - with open(fileout, 'w') as f : - f.write(txt) - ListFile.append(fileout) - return ListFile - class ChiSquare(AnalyseMatrix): def doparametres(self, dlg = None): if dlg is None : @@ -374,11 +66,7 @@ class ChiSquare(AnalyseMatrix): ) dial.CenterOnParent() val = dial.ShowModal() - if val==wx.ID_OK : - dlg.Center() - self.count = 1 - keepGoing = dlg.Update(self.count) - + if val==wx.ID_OK : self.colsel1 = dial.list_box_1.GetSelections() self.colsel2 = dial.list_box_2.GetSelections() if dial.chiopt : @@ -402,24 +90,9 @@ class ChiSquare(AnalyseMatrix): self.parametres = None def doanalyse(self): - - - #self.dlg=wx.ProgressDialog("Traitements", - # "Veuillez patienter...", - # maximum = 4, - # parent=parent, - # style = wx.PD_APP_MODAL|wx.PD_AUTO_HIDE|wx.PD_ELAPSED_TIME - # ) - - - - self.count += 1 + self.count = 1 keepGoing = self.dlg.Update(self.count,u"Analyse dans R...") - #analyse=MakeChi2(self.parent, self.colsel1, self.colsel2, self.chioption, self.tableau) - #self.tableau = tableau self.OutFrame=tempfile.mktemp(dir=self.parent.TEMPDIR) - print self.OutFrame - #self.parent=parent self.encode=self.parent.encode self.TEMPDIR=self.parent.TEMPDIR self.RPath=self.parent.PathPath.get('PATHS','rpath') @@ -435,11 +108,7 @@ class ChiSquare(AnalyseMatrix): rchioption[val] = 'FALSE' txt=""" source("%s") - """%self.parent.RscriptsPath['Rfunct'] -# if parent.tableau.: rownames=1 -# else : rownames='NULL' -# if parent.g_header : header = 'TRUE' -# else : header = 'FALSE' + """%ffr(self.parent.RscriptsPath['Rfunct']) txt += """ source("%s") """ % ffr(self.parent.RscriptsPath['Rgraph']) @@ -648,8 +317,8 @@ class ChiSquare(AnalyseMatrix): # parent.nb.SetSelection(parent.nb.GetPageCount()-1) # parent.ShowTab(wx.EVT_BUTTON) # parent.DisEnSaveTabAs(True) - self.count += 1 - keepGoing = self.dlg.Update(self.count,u"Fini") +# self.count += 1 +# keepGoing = self.dlg.Update(self.count,u"Fini") def dolayout(self, option): ListFile=[False] @@ -691,19 +360,10 @@ class ChiSquare(AnalyseMatrix): allcoord.append(coord_res) allhtml = [[clean_line(lcont[allcoord[i][j]+1:allcoord[i+1][j]]) for j, line in enumerate(allcoord[i])] for i, tab in enumerate(allcoord) if i!=len(allcoord)-1] - allhtml = [make_table(val,names[i],res) for i,val in enumerate(allhtml)] - links = make_link_list(res, self.TextCroise) - #colors = [line[-1] for line in res] - - # good = [i for i,chi in enumerate(res) if chi[-1] == 'green' or chi[-1] == 'blue'] - #select_good = [[val[i] for i in good] for val in tout] - - html_res = make_restab(res) allhtml.insert(0,html_res) - titles = make_title(res, self.TextCroise) allhtml.insert(0,titles) @@ -727,7 +387,6 @@ class ChiSquare(AnalyseMatrix):

"""%self.parent.SysEncoding - pretxt = '
\n'.join(links)+'


\n' txt = '


\n'.join(['

'.join([tab[i] for tab in allhtml]) for i,val in enumerate(res)]) txt = header + pretxt + txt + '\n' diff --git a/tabsimi.py b/tabsimi.py index 8b7c070..9de8067 100644 --- a/tabsimi.py +++ b/tabsimi.py @@ -5,7 +5,7 @@ #License: GNU/GPL from chemins import ConstructPathOut, simipath, ffr, PathOut -from functions import print_liste, exec_rcode, read_list_file, check_Rresult, indices_simi, treat_var_mod +from functions import print_liste, exec_rcode, read_list_file, check_Rresult, indices_simi, treat_var_mod, normpath_win32 from dialog import SelectColDial, FreqDialog from guifunct import PrefSimi from analysematrix import AnalyseMatrix @@ -21,7 +21,7 @@ from uuid import uuid4 class DoSimi(AnalyseMatrix): - def doanalyse(self) : + def doparametres(self, dlg = None) : self.fromprof = self.parametres.get('fromprof', False) self.wordgraph = self.parametres.get('wordgraph', False) self.listactives = self.parametres.get('listactives', False) @@ -29,16 +29,6 @@ class DoSimi(AnalyseMatrix): self.openfromprof = self.parametres.get('openfromprof', False) self.cmd = self.parametres.get('cmd', False) self.dirout = self.parametres.get('pathout', False) - #parent, matrix = None, parametres = None, isopen = False, fromprof = False, pathout = False, filename ='', gparent = False, wordgraph = False, listactives = False, actives = False, cmd = False, openfromprof=False, tableau = None): -#------------------------------------------------------------------- - # self.fromprof = fromprof - # self.wordgraph = wordgraph - # self.listactives = listactives - # self.actives = actives - # self.openfromprof = openfromprof - # self.cmd = cmd - # self.dirout = pathout - # if parametres is not None and fromprof: if self.fromprof: self.paramsimi = parametres else : @@ -76,20 +66,11 @@ class DoSimi(AnalyseMatrix): 'communities' : 0, } self.indices = indices_simi - #if fromprof : - # self.parent = parent.parent - # self.Source = parent - #else : self.Source = None if self.dirout : self.pathout = PathOut(dirout = self.dirout) - #self.RPath = self.parent.PathPath.get('PATHS', 'rpath') if not self.parametres.get('isopen', False) : - #if not fromprof : - # self.tableau = self.parent.tableau - #else : - # self.tableau = parent.tableau if self.tableau is None : self.tableau = parent.tableau self.tableau.parametres['mineff'] = 0 @@ -101,7 +82,7 @@ class DoSimi(AnalyseMatrix): res = wx.ID_OK if res == wx.ID_OK : if not self.actives : - self.tableau.selected_col = dialcol.list_box_1.GetSelections() + self.tableau.selected_col = dialcol.m_listBox1.GetSelections() actives = self.tableau.getactlistfromselection(self.tableau.selected_col) else : actives = self.actives @@ -133,17 +114,8 @@ class DoSimi(AnalyseMatrix): self.parametres['pathout'] = self.dirout self.pathout.createdir(self.parametres['pathout']) self.pathout.dirout = self.parametres['pathout'] - #self.parametres['filename'] = self.tableau.parametres['filename'] self.dial.Destroy() - self.doanalyse2() - #dlg = wx.ProgressDialog("Traitements", - # "Veuillez patienter...", - # maximum=4, - # parent=self.parent, - # style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_ELAPSED_TIME - # ) - #dlg.Center() - #AnalyseMatrix.__init__(self, parent, self.tableau, self.paramsimi, dlg = dlg) + #self.doanalyse2() else : self.dial.Destroy() self.parametres = None @@ -153,9 +125,9 @@ class DoSimi(AnalyseMatrix): self.parametres = None return False - def doanalyse2(self) : + def doanalyse(self) : self.pathout.basefiles(simipath) - with open(self.pathout['selected.csv'], 'w') as f : + with open(normpath_win32(self.pathout['selected.csv']), 'w') as f : f.write('\n'.join([`val` for val in self.column])) count = 1 @@ -191,8 +163,8 @@ class DoSimi(AnalyseMatrix): self.addgraph() self.tableau.save_tableau(self.pathout['db']) #self.make_ira() - count += 1 - self.dlg.Update(count, u"") + #count += 1 + #self.dlg.Update(count, u"") self.dlg.Destroy() #self.dial.Destroy() #self.dolayout() diff --git a/tabsplitvar.py b/tabsplitvar.py index f3e4513..4deea43 100644 --- a/tabsplitvar.py +++ b/tabsplitvar.py @@ -23,7 +23,7 @@ class SplitMatrixFromVar(AnalyseMatrix): dial.CenterOnParent() val = dial.ShowModal() if val == wx.ID_OK : - self.parametres['colsel'] = dial.list_box_1.GetSelections() + self.parametres['colsel'] = dial.m_listBox1.GetSelections() self.parametres['header'] = dial.header else : self.parametres = None diff --git a/textsimi.py b/textsimi.py index 807442e..dd5349c 100644 --- a/textsimi.py +++ b/textsimi.py @@ -38,10 +38,12 @@ class SimiTxt(AnalyseText): self.stars = copy(self.listet) self.parametres['stars'] = copy(self.listet) self.parametres['sfromchi'] = False + self.dlg.Destroy() prep = PrepSimi(self.ira, self, self.parametres, self.pathout['selected.csv'], self.actives, indices_simi, wordlist=dictcol) if prep.val == wx.ID_OK : continu = True self.parametres = prep.parametres + self.dlg = progressbar(self.ira, 4) else : continu = True if continu : diff --git a/textwordcloud.py b/textwordcloud.py index fab7c5a..07b65ed 100644 --- a/textwordcloud.py +++ b/textwordcloud.py @@ -25,6 +25,7 @@ class WordCloud(AnalyseText): self.parametres['type'] = 'wordcloud' #FIXME limit = 3 + self.dlg.Destroy() res = self.make_option() if res == wx.ID_OK : if self.parametres['mode'] == 2 : @@ -36,6 +37,7 @@ class WordCloud(AnalyseText): self.actives = self.corpus.make_actives_limit(limit, 2) dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], dlg = True) + self.dlg = progressbar(self.ira, 2) self.make_wordcloud() script = WordCloudRScript(self) script.make_script() diff --git a/tree.py b/tree.py index 708e0dc..aa4d00d 100644 --- a/tree.py +++ b/tree.py @@ -125,6 +125,7 @@ class LeftTree(CT.CustomTreeCtrl): self.ild['chi2'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'chi2.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.ild['reinertmatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'reinertmatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.ild['simimatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'simimatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) + self.ild['proto'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'proto.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap()) self.SetImageList(self.il) self.count = 0