X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textsimi.py;h=9a68ac3c1e2c1ba9d6b66b4f3dc516acadf849af;hp=18da495dfdf6b9e9990a20080f609e51bce111e6;hb=1f82fb8e9ed83b8524b00039f1a8c51c2b12a8be;hpb=44b2ba75167b1ed5508e2f110130805bfe43a3bd diff --git a/textsimi.py b/textsimi.py index 18da495..9a68ac3 100644 --- a/textsimi.py +++ b/textsimi.py @@ -31,20 +31,33 @@ class SimiTxt(AnalyseText): #FIXME self.actives = self.corpus.make_actives_limit(3) 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']) - self.makefiles() - prep = PrepSimi(self.ira, self.parametres, indices_simi) - self.parametres = prep.parametres - script = PrintSimiScript(self) - script.make_script() - self.doR(script.scriptout) - if self.parametres['type_graph'] == 1: - if os.path.exists(self.pathout['liste_graph']): - graph_simi = read_list_file(self.pathout['liste_graph']) - graph_simi.append([os.path.basename(script.filename), script.txtgraph]) - else : - graph_simi = [[os.path.basename(script.filename), script.txtgraph]] - print_liste(self.pathout['liste_graph'], graph_simi) + continu = False + if self.dlg : + #cont = SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], dlg = self.dlg) + #if cont.ok : + self.listet = self.corpus.make_etoiles() + self.listet.sort() + self.stars = copy(self.listet) + self.parametres['stars'] = copy(self.listet) + self.parametres['sfromchi'] = False + 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 + if continu : + self.makefiles() + script = PrintSimiScript(self) + script.make_script() + self.doR(script.scriptout) + if self.parametres['type_graph'] == 1: + if os.path.exists(self.pathout['liste_graph']): + graph_simi = read_list_file(self.pathout['liste_graph']) + graph_simi.append([os.path.basename(script.filename), script.txtgraph]) + else : + graph_simi = [[os.path.basename(script.filename), script.txtgraph]] + print_liste(self.pathout['liste_graph'], graph_simi) + else : + return False def preferences(self) : dial = StatDialog(self, self.parent) @@ -106,10 +119,7 @@ class SimiTxt(AnalyseText): with open(self.pathout['actives.csv'], 'w') as f : f.write('\n'.join(self.actives).encode(self.ira.syscoding)) - self.listet = self.corpus.make_etoiles() - self.listet.sort() - self.parametres['stars'] = copy(self.listet) - self.parametres['sfromchi'] = False +