ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la, uci = uci)
items = dict([[i, '<br>'.join([ucis_txt[i], '<table bgcolor = #1BF0F7 border=0><tr><td><b>score : %.2f</b></td></tr></table><br>' % ntab2[i][0], ucestxt[i]])] for i, uce in enumerate(nuces)])
dlg.Update(4, u'texte...')
- win = message(self, items, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600))
+ win = message(self, items, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600), uceids = nuces)
#win.html = '<html>\n' + '<br>'.join(['<br>'.join([ucis_txt[i], '<table bgcolor = #1BF0F7 border=0><tr><td><b>score : %.2f</b></td></tr></table>' % ntab2[i][0], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n</html>'
#win.HtmlPage.SetPage(win.html)
dlg.Destroy()
nbcl = len(title)
nbwords = len(words)
BarFrame(self.Source.parent, tableout, title, words)
-# txt = barplot(tableout, words, title, self.Source.parent.RscriptsPath['Rgraph'], tmpgraph)
-# #print 'ATTENTION TEST R'
-# #txt = """
-# #sink('/Users/pierre/Desktop/qdfqsdfqsdfqsdf.txt')
-# #Sys.getlocale()
-# #sink()
-# #"""
-# tmpscript = tempfile.mktemp(dir=self.Source.parent.TEMPDIR)
-# file = open(tmpscript,'w')
-# file.write(txt)
-# file.close()
-# exec_rcode(self.Source.parent.RPath, tmpscript, wait = True)
-# w = 100 + (20 * nbwords) + (100 * nbcl)
-# h = 100 + (nbwords * 15)
-# if w > 1100 : w = 1100
-# if h > 800 : h = 800
-# if h < 450 : h = 450
-# win = MessageImage(self, u"Graphique", size=(w, h))
-# win.addsaveimage(tmpgraph)
-# txt = "<img src='%s'>" % tmpgraph
-# win.HtmlPage.SetPage(txt)
-# win.Show(True)
def onlexdendro(self, evt):
if 'corpus' in dir(self.Source):
uci = True
ucis_txt, ucestxt = doconcorde(corpus, ucef, ListWord, uci = uci)
items = dict([[i, '<br><br>'.join([ucis_txt[i], ucestxt[i]])] for i in range(0,len(ucestxt))])
- win = message(self, items, title, (800, 500))
+ win = message(self, items, title, (800, 500), uceids = ucef)
return win
def OnPopupTwo(self, event):
def OnPopupThree(self, event):
corpus = self.Source.corpus
uces = [classe[i] for classe in corpus.lc for i in range(0,len(classe))]
- win = self.make_concord(uces, "Concordancier - UCE classées")
+ win = self.make_concord(uces, "Concordancier - Segments de texte classés")
win.Show(True)
def OnPopupFour(self, event):
corpus = self.Source.corpus
uces = [classe[i] for classe in corpus.lc for i in range(0,len(classe))] + corpus.lc0
- win = self.make_concord(uces, "Concordancier - Toutes les UCE")
+ win = self.make_concord(uces, "Concordancier - Tous les segments de texte")
win.Show(True)
def OnPopupFive(self, event):
from layout import open_antiprofil, TgenLayout
from guifunct import TGenFrame
from textaslexico import TgenSpec
+from textreinert import TgenProf
log = logging.getLogger('iramuteq.tree')
self.SetItemImage(self.root, 24, CT.TreeItemIcon_Normal)
self.SetItemImage(self.root, 13, CT.TreeItemIcon_Expanded)
- self.textroot = self.AppendItem(self.root, u'Corpus texte')
+ self.textroot = self.AppendItem(self.root, _(u'Textual corpus'))
self.SetPyData(self.textroot, {'uuid': 'textroot'})
self.SetItemImage(self.textroot, imgtextroot, CT.TreeItemIcon_Normal)
self.SetItemImage(self.textroot, imgtextroot, CT.TreeItemIcon_Expanded)
self.SetItemImage(last, img, CT.TreeItemIcon_Normal)
self.SetItemImage(last, img, CT.TreeItemIcon_Expanded)
- self.matroot = self.AppendItem(self.root, u'Matrices')
+ self.matroot = self.AppendItem(self.root, _(u'Matrix'))
self.SetPyData(self.matroot, {'uuid': 'matroot'})
self.SetItemImage(self.matroot, imgmatroot, CT.TreeItemIcon_Normal)
self.SetItemImage(self.matroot, imgmatroot, CT.TreeItemIcon_Expanded)
profsr = menu.Append(wx.ID_ANY, _(u"Repeated segments profiles").decode('utf8'))
profgram = menu.Append(wx.ID_ANY, _(u"POS profiles").decode('utf8'))
+ tgen = menu.Append(wx.ID_ANY, _(u"Tgen Editor").decode('utf8'))
+ computetgen = menu.Append(wx.ID_ANY, _(u"Compute Tgen").decode('utf8'))
export_corpus = menu.Append(wx.ID_ANY, _(u"Export corpus").decode('utf8'))
colored = menu.Append(wx.ID_ANY, _(u"Colored corpus").decode('utf8'))
navig = menu.Append(wx.ID_ANY, _(u"Navigator").decode('utf8'))
self.Bind(wx.EVT_MENU, self.OpenAntipro, antipro)
self.Bind(wx.EVT_MENU, self.OnProfSR, profsr)
self.Bind(wx.EVT_MENU, self.OnProfGram, profgram)
+ self.Bind(wx.EVT_MENU, self.OnTgenEditor, tgen)
+ self.Bind(wx.EVT_MENU, self.OnTgenCompute, computetgen)
self.Bind(wx.EVT_MENU, self.OnExportCorpus, export_corpus)
self.Bind(wx.EVT_MENU, self.OnColored, colored)
self.Bind(wx.EVT_MENU, self.OnNavig, navig)
else :
self.page.parametres['tgenpath'] = tgenpath
tgen = TGen(path = tgenpath, encoding = self.parent.syscoding)
- self.page.parametres['etoiles'] = self.page.etoiles
- TgenSpec(self.parent, corpus, self.page.parametres)
+ if self.page.parametres['type'] == 'spec' :
+ self.page.parametres['etoiles'] = self.page.etoiles
+ TgenSpec(self.parent, corpus, self.page.parametres)
+ elif self.page.parametres['type'] == 'alceste' :
+ TgenProf(self.parent, corpus, self.page.parametres, self.page.cluster_size)
TgenLayout(self.page)
def OnExportClasses(self, event):