X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=ProfList.py;h=e882f7ebd126751f3e78f79e7f5d6f280c03b952;hp=1bc2c609b8a4ca4a69336ecd2b7e61bc617b9d2e;hb=54fef96ad151ba25920f3e589b39a83c3f62ae2c;hpb=bd8d0a889d1d393e64a6d768dc14e9c639a0df8c diff --git a/ProfList.py b/ProfList.py index 1bc2c60..e882f7e 100644 --- a/ProfList.py +++ b/ProfList.py @@ -511,7 +511,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col act = {} tableau.chi = {} tableau.lchi = self.lchi - tableau.parametre['fromprof'] = True + tableau.parametres['fromprof'] = True for i, val in enumerate(self.la) : act[val] = [self.lfreq[i]] tableau.chi[val] = [self.lchi[i]] @@ -600,10 +600,11 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col nuces = [val[1] for val in ntab2] dlg.Update(3, u'concordancier...') ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la, uci = uci) + items = dict([[i, '
'.join([ucis_txt[i], '
score : %.2f

' % ntab2[i][0], ucestxt[i]])] for i in range(0,len(ucestxt))]) dlg.Update(4, u'texte...') - win = message(self, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600)) - win.html = '\n' + '
'.join(['
'.join([ucis_txt[i], '
score : %.2f
' % ntab2[i][0], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' - win.HtmlPage.SetPage(win.html) + win = message(self, items, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600)) + #win.html = '\n' + '
'.join(['
'.join([ucis_txt[i], '
score : %.2f
' % ntab2[i][0], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' + #win.HtmlPage.SetPage(win.html) dlg.Destroy() win.Show(True) @@ -708,16 +709,19 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col ucef += list(set(corpus.getlemucis(word)).intersection(uces)) uci = True ucis_txt, ucestxt = doconcorde(corpus, ucef, ListWord, uci = uci) - win = message(self, title, size=(750, 600)) - win.html = ('\n

%s

' % ' '.join(ListWord)) + '
'.join(['
'.join([ucis_txt[i], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' - win.HtmlPage.SetPage(win.html) + items = dict([[i, '

'.join([ucis_txt[i], ucestxt[i]])] for i in range(0,len(ucestxt))]) + win = message(self, items, title, (800, 500)) + #win = message(self, title, size=(750, 600)) + #win.html = ('\n

%s

' % ' '.join(ListWord)) + '
'.join(['
'.join([ucis_txt[i], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n' + #win.HtmlPage.SetPage(win.html) return win def OnPopupTwo(self, event): - corpus = self.Source.corpus - uces = corpus.lc[self.cl-1] - win = self.make_concord(uces, "Concordancier - Classe %i" % self.cl) - win.Show(True) + if 'corpus' in dir(self.Source) : + corpus = self.Source.corpus + uces = corpus.lc[self.cl-1] + win = self.make_concord(uces, "Concordancier - Classe %i" % self.cl) + win.Show(True) def OnPopupThree(self, event): corpus = self.Source.corpus @@ -780,9 +784,11 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col nb = len(ucef) rep.append([corpus.getforme(forme).forme, nb]) rep.sort(key = itemgetter(1), reverse = True) - win = message(self, u"Formes associées", wx.Size(300, 200)) - win.html = '\n' + '
'.join([' : '.join([str(val) for val in forme]) for forme in rep]) + '\n' - win.HtmlPage.SetPage(win.html) + #win = message(self, u"Formes associées", wx.Size(300, 200)) + items = dict([[i, '\t:\t'.join([str(val) for val in forme])] for i, forme in enumerate(rep)]) + win = message(self, items, u"Formes associées", (300, 200)) + #win.html = '\n' + '
'.join([' : '.join([str(val) for val in forme]) for forme in rep]) + '\n' + #win.HtmlPage.SetPage(win.html) win.Show(True)