X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;ds=inline;f=ProfList.py;h=6c206ada592965313d0eba361ccb1c939212ad0d;hb=2ffa9388c45dce689bb45c1cf6c7ad81d2636409;hp=d6050c62caf0e14a15d10de492439048d1143a55;hpb=437f0dd98164afb134c221fe4c4378ec7e3b64e5;p=iramuteq
diff --git a/ProfList.py b/ProfList.py
index d6050c6..6c206ad 100644
--- a/ProfList.py
+++ b/ProfList.py
@@ -27,7 +27,7 @@ import webbrowser
#import cStringIO
import tempfile
import codecs
-from functions import exec_rcode, MessageImage, progressbar, treat_var_mod
+from functions import exec_rcode, MessageImage, progressbar, treat_var_mod, doconcorde
from PrintRScript import barplot
from textclassechd import ClasseCHD
from shutil import copyfile
@@ -358,7 +358,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
parametres['clusterprof'] = prof
parametres['type'] = 'clustercloud'
parametres['prof'] = self.Source.pathout['actprof_classe_%i.csv' % self.cl]
- print parametres['prof']
+ del parametres['uuid']
#if not os.path.exists(self.Source.pathout['actprof_classe_%i.csv' % self.lc]) :
# with open(self.Source.pathout['actprof_classe_%i.csv' % self.lc], 'w') as f :
# f.write('\n'.join(prof).encode(self.parent.syscoding))
@@ -553,24 +553,10 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
ntab2 = ntab2[:limite]
nuces = [val[1] for val in ntab2]
dlg.Update(3, u'concordancier...')
- #ucestxt = [corpus.ucis_paras_uces[val[1][0]][val[1][1]][val[1][2]] for val in ntab2]
- ucestxt1 = [row for row in corpus.getconcorde(nuces)]
- ucestxt = []
- ucis_txt = []
- for uce in ucestxt1 :
- ucetxt = ' '+uce[1]+' '
- ucis_txt.append(' '.join(corpus.ucis[corpus.getucefromid(uce[0]).uci].etoiles) + '
')
- for lem in self.la :
- listmot = corpus.getlems()[lem].formes
- for id in listmot :
- forme = corpus.getforme(id).forme
- ucetxt = ucetxt.replace(' '+forme+' ', ' ' + forme + ' ')
- ucestxt.append(ucetxt)
- #ucestxt = [corpus.make_concord(self.la, ' '.join(uce), 'red') for uce in ucestxt]
+ ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la)
dlg.Update(4, u'texte...')
- #ucis_txt = [' '.join(corpus.ucis[val[1][0]][0]) for val in ntab2]
win = message(self, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600))
- win.html = '\n' + '
'.join(['
'.join([ucis_txt[i], 'score : ' + str(ntab2[i][0]), ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n'
+ win.html = '\n' + '
'.join(['
'.join([ucis_txt[i], '
score : %.2f |