2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2008-2012 Pierre Ratinaud
9 from ConfigParser import ConfigParser
10 from subprocess import Popen, call, PIPE
22 from shutil import copyfile
24 #from dialog import BugDialog
27 log = logging.getLogger('iramuteq')
30 indices_simi = [u'cooccurrence' ,'pourcentage de cooccurrence',u'Russel',u'Jaccard', 'Kulczynski1', 'Kulczynski2', 'Mountford', 'Fager', 'simple matching', 'Hamman', 'Faith', 'Tanimoto', 'Dice', 'Phi', 'Stiles', 'Michael', 'Mozley', 'Yule', 'Yule2', 'Ochiai', 'Simpson', 'Braun-Blanquet','Chi-squared', 'Phi-squared', 'Tschuprow', 'Cramer', 'Pearson', 'binomial']
34 def __init__(self, filein, syscoding = 'utf8') :
36 self.syscoding = syscoding
38 self.openedcorpus = {}
46 d = shelve.open(self.filein)
47 self.history = d.get('history', [])
48 self.matrix = d.get('matrix', [])
49 self.ordercorpus = dict([[corpus['uuid'], i] for i, corpus in enumerate(self.history)])
50 self.corpus = dict([[corpus['uuid'], corpus] for corpus in self.history])
51 self.analyses = dict([[analyse['uuid'], analyse] for corpus in self.history for analyse in corpus.get('analyses', [])])
52 self.matrixanalyse = dict([[mat['uuid'], mat] for mat in self.matrix])
56 d = shelve.open(self.filein)
57 d['history'] = self.history
58 d['matrix'] = self.matrix
61 def add(self, analyse) :
62 log.info('add to history %s' % analyse.get('corpus_name', 'pas un corpus'))
63 tosave = {'uuid' : analyse['uuid'], 'ira': analyse['ira'], 'type' : analyse['type']}
64 if analyse.get('corpus', False) :
65 if analyse['uuid'] in self.analyses :
67 tosave['corpus'] = analyse['corpus']
68 tosave['name'] = analyse['name']
69 acorpus_uuid = analyse['corpus']
70 if acorpus_uuid in self.corpus :
71 if 'analyses' in self.history[self.ordercorpus[acorpus_uuid]] :
72 self.history[self.ordercorpus[acorpus_uuid]]['analyses'].append(tosave)
74 self.history[self.ordercorpus[acorpus_uuid]]['analyses'] = [tosave]
76 self.orph.append(tosave)
78 tosave['corpus_name'] = analyse['corpus_name']
79 self.history.append(tosave)
83 def addMatrix(self, analyse) :
84 tosave = {'uuid' : analyse['uuid'], 'ira': analyse['ira'], 'type' : analyse['type']}
85 tosave['name'] = analyse['name']
86 self.matrix.append(tosave)
90 def addmultiple(self, analyses) :
91 log.info('add multiple')
92 for analyse in analyses :
93 tosave = {'uuid' : analyse['uuid'], 'ira': analyse['ira'], 'type' : analyse['type']}
94 corpus = analyse['corpus']
95 tosave['corpus'] = corpus
96 tosave['name'] = analyse['name']
97 if corpus in self.corpus :
98 if 'analyses' in self.history[self.ordercorpus[corpus]] :
99 self.history[self.ordercorpus[corpus]]['analyses'].append(tosave)
101 self.history[self.ordercorpus[corpus]]['analyses'] = [tosave]
105 def delete(self, analyse, corpus = False) :
106 log.info('delete %s' % analyse.get('name', 'noname'))
108 self.history.pop(self.ordercorpus[analyse['uuid']])
109 if analyse['uuid'] in self.openedcorpus :
110 del self.openedcorpus[analyse['uuid']]
111 elif analyse['uuid'] in self.analyses :
112 todel = [i for i, ana in enumerate(self.corpus[analyse['corpus']]['analyses']) if ana['uuid'] == analyse['uuid']][0]
113 self.history[self.ordercorpus[analyse['corpus']]]['analyses'].pop(todel)
114 elif analyse['uuid'] in self.matrixanalyse :
115 self.matrix = [mat for mat in self.matrix if mat['uuid'] != analyse['uuid']]
119 def addtab(self, analyse) :
120 self.opened[analyse['uuid']] = analyse
122 def rmtab(self, analyse) :
123 del self.opened[analyse['uuid']]
126 corpustodel = [corpus for corpus in self.history if not os.path.exists(corpus['ira'])]
128 for corpus in corpustodel :
129 print 'cleaning :', corpus['corpus_name']
130 self.delete(corpus, corpus = True)
133 return str(self.history)
136 def __init__(self, configfile=None, diff = None, parametres = None) :
137 self.configfile = configfile
138 self.conf = ConfigParser()
139 if configfile is not None :
140 self.conf.readfp(codecs.open(configfile, 'r', 'utf8'))
142 if parametres is not None :
143 self.doparametres(parametres)
145 def doparametres(self, parametres) :
148 def getsections(self) :
149 return self.conf.sections()
151 def getoptions(self, section = None, diff = None):
154 section = self.conf.sections()[0]
155 for option in self.conf.options(section) :
156 if self.conf.get(section, option).isdigit() :
157 parametres[option] = int(self.conf.get(section, option))
158 elif self.conf.get(section, option) == 'False' :
159 parametres[option] = False
160 elif self.conf.get(section, option) == 'True' :
161 parametres[option] = True
162 elif self.conf.get(section, option).startswith('(') and self.conf.get(section, option).endswith(')') :
163 parametres[option] = ast.literal_eval(self.conf.get(section, option))
164 elif self.conf.get(section, option).startswith('[') and self.conf.get(section, option).endswith(']') :
165 parametres[option] = ast.literal_eval(self.conf.get(section, option))
167 parametres[option] = self.conf.get(section, option)
168 if 'type' not in parametres :
169 parametres['type'] = section
172 def makeoptions(self, sections, parametres, outfile = None) :
174 for i, section in enumerate(sections) :
175 txt += '[%s]\n' % section
176 if not self.conf.has_section(section) :
177 self.conf.add_section(section)
178 for option in parametres[i] :
179 if isinstance(parametres[i][option], int) :
180 self.conf.set(section, option, `parametres[i][option]`)
181 txt += '%s = %i\n' % (option, parametres[i][option])
182 elif isinstance(parametres[i][option], basestring) :
183 self.conf.set(section, option, parametres[i][option].encode('utf8'))
184 txt += '%s = %s\n' % (option, parametres[i][option])
185 elif isinstance(parametres[i][option], wx.Colour) :
186 self.conf.set(section, option, str(parametres[i][option]))
187 txt += '%s = %s\n' % (option, str(parametres[i][option]))
188 elif option == 'analyses' :
191 self.conf.set(section, option, `parametres[i][option]`)
192 txt += '%s = %s\n' % (option, `parametres[i][option]`)
194 outfile = self.configfile
195 with codecs.open(outfile, 'w', 'utf8') as f :
199 def totext(self, parametres) :
202 for val in parametres :
203 if isinstance(parametres[val], int) :
204 txt.append(' \t\t: '.join([val, `parametres[val]`]))
205 elif isinstance(parametres[val], basestring) :
206 txt.append(' \t\t: '.join([val, parametres[val]]))
207 elif val in ['listet', 'stars'] :
210 txt.append(' \t\t: '.join([val, `parametres[val]`]))
211 return '\n'.join(txt)
214 def write_tab(tab, fileout) :
215 writer = csv.writer(open(fileout, 'wb'), delimiter=';', quoting = csv.QUOTE_NONNUMERIC)
216 writer.writerows(tab)
218 class BugDialog(wx.Dialog):
219 def __init__(self, *args, **kwds):
220 # begin wxGlade: MyDialog.__init__
221 kwds["style"] = wx.DEFAULT_DIALOG_STYLE
222 kwds["size"] = wx.Size(500, 200)
223 wx.Dialog.__init__(self, *args, **kwds)
224 self.SetTitle(kwds['title'])
225 self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE)
226 self.text_ctrl_1.SetBackgroundColour('#DDE8EB')
227 self.button_1 = wx.Button(self, wx.ID_OK, "")
229 self.__set_properties()
233 def __set_properties(self):
234 # begin wxGlade: MyDialog.__set_properties
235 self.SetMinSize(wx.Size(500, 200))
236 self.text_ctrl_1.SetMinSize(wx.Size(500, 200))
240 def __do_layout(self):
241 # begin wxGlade: MyDialog.__do_layout
242 sizer_1 = wx.BoxSizer(wx.VERTICAL)
243 sizer_1.Add(self.text_ctrl_1, 1, wx.EXPAND, 0)
244 sizer_1.Add(self.button_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
245 self.SetSizer(sizer_1)
250 def CreateIraFile(DictPathOut, clusternb, corpname='corpus_name', section = 'analyse'):
251 AnalyseConf = ConfigParser()
252 AnalyseConf.read(DictPathOut['ira'])
253 AnalyseConf.add_section(section)
254 date = datetime.datetime.now().ctime()
255 AnalyseConf.set(section, 'date', str(date))
256 AnalyseConf.set(section, 'clusternb', clusternb)
257 AnalyseConf.set(section, 'corpus_name', corpname)
259 fileout = open(DictPathOut['ira'], 'w')
260 AnalyseConf.write(fileout)
263 def sortedby(list, direct, *indices):
266 sortedby: sort a list of lists (e.g. a table) by one or more indices
267 (columns of the table) and return the sorted list
270 for list = [[2,3],[1,2],[3,1]]:
271 sortedby(list,1) will return [[3, 1], [1, 2], [2, 3]],
272 sortedby(list,0) will return [[1, 2], [2, 3], [3, 1]]
275 nlist = map(lambda x, indices=indices:
276 map(lambda i, x=x: x[i], indices) + [x],
281 nlist.sort(reverse=True)
282 return map(lambda l: l[-1], nlist)
284 def add_type(line, dictlem):
285 if line[4] in dictlem:
286 line.append(dictlem[line[4]])
291 def treat_line_alceste(i, line) :
292 if line[0] == '*' or line[0] == '*****' :
297 elif float(line[5].replace(',', '.')) < 0.0001:
299 elif float(line[5].replace(',', '.')) > 0.05:
300 line[5] = 'NS (%s)' % str(float(line[5].replace(',', '.')))[0:7]
302 line[5] = str(float(line[5].replace(',', '.')))[0:7]
303 return [i, int(line[0]), int(line[1]), float(line[2]), float(line[3]), line[6], line[4], line[5]]
305 def ReadProfileAsDico(File, Alceste=False, encoding = sys.getdefaultencoding()):
306 #print 'lecture des profils : ReadProfileAsDico'
308 # print 'lecture du dictionnaire de type'
310 # for line in parent.corpus.lem_type_list :
311 # dictlem[line[0]] = line[1]
313 print 'lecture des profiles'
314 #encoding = sys.getdefaultencoding()
315 FileReader = codecs.open(File, 'r', encoding)
316 Filecontent = FileReader.readlines()
320 #rows = [row.replace('\n', '').replace("'", '').replace('\"', '').replace(',', '.').replace('\r','').split(';') for row in Filecontent]
321 rows = [row.replace('\n', '').replace("'", '').replace('\"', '').replace('\r','').split(';') for row in Filecontent]
323 ClusterNb = rows[0][2]
325 clusters = [row[2] for row in rows if row[0] == u'**']
326 valclusters = [row[1:4] for row in rows if row[0] == u'****']
327 lp = [i for i, line in enumerate(rows) if line[0] == u'****']
328 prof = [rows[lp[i] + 1:lp[i+1] - 1] for i in range(0, len(lp)-1)] + [rows[lp[-1] + 1:len(rows)]]
330 prof = [[add_type(row, dictlem) for row in pr] for pr in prof]
331 prof = [[treat_line_alceste(i,line) for i, line in enumerate(pr)] for pr in prof]
333 prof = [[line + [''] for line in pr] for pr in prof]
334 prof = [[treat_line_alceste(i,line) for i, line in enumerate(pr)] for pr in prof]
335 for i, cluster in enumerate(clusters):
336 DictProfile[cluster] = [valclusters[i]] + prof[i]
339 def GetTxtProfile(dictprofile, cluster_size) :
341 for classe in range(0, len(dictprofile)) :
342 prof = dictprofile[str(classe + 1)]
343 clinfo = cluster_size[classe]
344 proflist.append('\n'.join([' '.join(['classe %i' % (classe + 1), '-', '%s uce sur %s - %s%%' % (clinfo[0], clinfo[1], clinfo[2])]), '\n'.join(['%5s|%5s|%6s|%6s|%8s|%8s|%20s\t%10s' % tuple([str(val) for val in line]) for line in prof if len(line)==8])]))
345 return '\n\n'.join(proflist)
347 def formatExceptionInfo(maxTBlevel=5):
348 cla, exc, trbk = sys.exc_info()
350 excName = cla.__name__
354 excArgs = exc.args[0]
356 excArgs = "<no args>"
357 excTb = traceback.format_tb(trbk, maxTBlevel)
358 return (excName, excArgs, excTb)
361 #fonction des etudiants de l'iut
362 def decoupercharact(chaine, longueur, longueurOptimale, separateurs = None) :
364 on part du dernier caractère, et on recule jusqu'au début de la chaîne.
365 Si on trouve un '$', c'est fini.
366 Sinon, on cherche le meilleur candidat. C'est-Ã -dire le rapport poids/distance le plus important.
368 separateurs = [[u'.', 60.0], [u'?', 60.0], [u'!', 60.0], [u'£$£', 60], [u':', 50.0], [u';', 40.0], [u',', 10.0], [u' ', 0.1]]
369 trouve = False # si on a trouvé un bon séparateur
370 iDecoupe = 0 # indice du caractere ou il faut decouper
372 # on découpe la chaine pour avoir au maximum 240 caractères
373 longueur = min(longueur, len(chaine) - 1)
374 chaineTravail = chaine[:longueur + 1]
376 meilleur = ['', 0, 0] # type, poids et position du meilleur separateur
378 # on vérifie si on ne trouve pas un '$'
379 indice = chaineTravail.find(u'$')
384 # si on ne trouve rien, on cherche le meilleur séparateur
387 caractere = chaineTravail[nbCar]
388 distance = abs(longueurOptimale - nbCar) + 1
389 meilleureDistance = abs(longueurOptimale - meilleur[2]) + 1
391 # on vérifie si le caractére courant est une marque de ponctuation
392 for s in separateurs:
393 if caractere == s[0]:
394 # si c'est une ponctuation
396 if s[1] / distance > float(meilleur[1]) / meilleureDistance:
404 # et on termine la recherche
407 # on passe au caractère précédant
412 fin = chaine[iDecoupe + 1:]
413 retour = chaineTravail[:iDecoupe]
414 return len(retour) > 0, retour.split(), fin
415 # si on a rien trouvé
416 return False, chaine.split(), ''
419 exceptions = {'paragrapheOT' : u"Un problème de formatage (présence d'un marqueur de paragraphe (-*) en dehors d'un texte) est survenu à la ligne ",
420 'EmptyText' : u"Texte vide (probablement un problème de formatage du corpus). Le problème est apparu à la ligne ",
421 'CorpusEncoding' : u"Problème d'encodage.",
422 'TextBeforeTextMark' : u"Problème de formatage : du texte avant le premier marqueur de texte (****). Le problème est survenu à la ligne ",
425 def BugReport(parent, error = None):
426 for ch in parent.GetChildren():
427 if "<class 'wx._windows.ProgressDialog'>" == str(type(ch)):
429 excName, exc, excTb = formatExceptionInfo()
430 if excName == 'Exception' :
432 if len(exc.split()) == 2 :
433 mss, linenb = exc.split()
434 if mss in exceptions :
435 txt = exceptions[mss] + linenb
439 if exc in exceptions :
440 txt = exceptions[exc]
443 title = "Information"
445 txt = u' !== BUG ==! \n'
446 txt += u'*************************************\n'
447 txt += '\n'.join(excTb).replace(' ', ' ')
448 txt += excName + '\n'
452 dial = BugDialog(parent, **{'title' : title})
453 if 'Rerror' in dir(parent) :
457 dial.text_ctrl_1.write(txt)
458 dial.CenterOnParent()
462 def PlaySound(parent):
463 if parent.pref.getboolean('iramuteq', 'sound') :
465 if "gtk2" in wx.PlatformInfo:
466 error = Popen(['aplay','-q',os.path.join(parent.AppliPath,'son_fin.wav')])
468 sound = wx.Sound(os.path.join(parent.AppliPath, 'son_fin.wav'))
469 sound.Play(wx.SOUND_SYNC)
473 def ReadDicoAsDico(dicopath):
474 with codecs.open(dicopath, 'r', 'UTF8') as f:
475 content = f.readlines()
477 for line in content :
479 line = line.rstrip('\n\r').replace(u'\n', '').replace('"', '').split('\t')
480 dico[line[0]] = line[1:]
483 def ReadLexique(parent, lang = 'french', filein = None):
486 parent.lexique = ReadDicoAsDico(parent.DictPath.get(lang, 'french'))
488 parent.lexique = ReadDicoAsDico(filein)
492 def ReadList(filein, encoding = sys.getdefaultencoding()):
494 file = codecs.open(filein, 'r', encoding)
495 content = file.readlines()
497 first = content.pop(0)
498 first = first.replace('\n', '').replace('\r','').replace('\"', '').split(';')
502 line = line.replace('\n', '').replace('\r','').replace('\"', '').replace(',', '.')
503 line = line.split(';')
512 don = float('%.5f' % float(val))
518 def exec_RCMD(rpath, command) :
519 log.info('R CMD INSTALL %s' % command)
520 rpath = rpath.replace('\\','\\\\')
521 error = call(["%s" % rpath, 'CMD', 'INSTALL', "%s" % command])
524 def exec_rcode(rpath, rcode, wait = True, graph = False):
525 log.info("R Script : %s" % rcode)
527 if sys.platform == 'darwin' :
529 macversion = platform.mac_ver()[0].split('.')
530 if int(macversion[1]) < 5 :
537 rpath = rpath.replace('\\','\\\\')
538 env = os.environ.copy()
539 if sys.platform == 'darwin' and 'LC_ALL' not in env:
540 env['LC_ALL'] = 'en_US.UTF-8'
543 if sys.platform == 'win32':
544 error = call(["%s" % rpath, "--vanilla","--slave","-f", "%s" % rcode])
546 error = call([rpath, '--slave', "--vanilla", "-f %s" % rcode, "--encoding=UTF-8"], env = env)
549 if sys.platform == 'win32':
550 pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
552 pid = Popen([rpath, '--slave', "--vanilla", "-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
556 if sys.platform == 'win32':
557 error = call(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
558 elif sys.platform == 'darwin' and needX11:
559 os.environ['DISPLAY'] = ':0.0'
560 error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], env = env)
562 error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], env = env)
565 if sys.platform == 'win32':
566 pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
567 elif sys.platform == 'darwin' and needX11:
568 os.environ['DISPLAY'] = ':0.0'
569 pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
571 pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
574 def check_Rresult(parent, pid) :
575 if isinstance(pid, Popen) :
576 if pid.returncode != 0 :
577 error = pid.communicate()
578 error = [str(error[0]), error[1]]
579 if error[1] is None :
581 parent.Rerror = '\n'.join([str(pid.returncode), '\n'.join(error)])
583 raise Exception('\n'.join([u'Erreur R', '\n'.join(error[1:])]))
592 raise Exception(u'Erreur R')
599 def print_liste(filename,liste):
600 with open(filename,'w') as f :
602 f.write(';'.join(graph)+'\n')
604 def read_list_file(filename, encoding = sys.getdefaultencoding()):
605 with codecs.open(filename,'rU', encoding) as f :
606 content=f.readlines()
607 ncontent=[line.replace('\n','').split(';') for line in content if line.strip() != '']
610 class MessageImage(wx.Frame):
611 def __init__(self, parent,title, size):
612 wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_FRAME_STYLE )
613 self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
614 self.imageFile = False
615 self.imagename = u"chi_classe.png"
616 self.HtmlPage = wx.html.HtmlWindow(self, -1)
617 self.HtmlPage.SetMinSize(size)
618 if "gtk2" in wx.PlatformInfo:
619 self.HtmlPage.SetStandardFonts()
620 self.HtmlPage.SetFonts('Courier', 'Courier')
622 self.button_1 = wx.Button(self, wx.ID_CANCEL)
623 self.button_2 = wx.Button(self, wx.ID_SAVE)
624 self.Bind(wx.EVT_BUTTON, self.OnCloseMe, self.button_1)
625 self.Bind(wx.EVT_BUTTON, self.OnSaveImage, self.button_2)
629 self.sizer_1 = wx.BoxSizer(wx.VERTICAL)
630 self.sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
631 self.sizer_1.Add(self.HtmlPage, 2, wx.EXPAND, 0)
633 self.m_sdbSizer1 = wx.StdDialogButtonSizer()
634 self.m_sdbSizer1.AddButton( self.button_2 )
635 self.m_sdbSizer1.AddButton( self.button_1 )
636 self.m_sdbSizer1.Realize()
637 self.sizer_1.Add(self.m_sdbSizer1, 0, wx.EXPAND, 5)
638 self.SetSizer(self.sizer_1)
640 self.sizer_1.Fit( self )
642 def addsaveimage(self, imageFile) :
643 self.imageFile = imageFile
645 def OnCloseMe(self, event):
648 def OnSaveImage(self, event) :
650 self, message="Enregistrer sous...", defaultDir=os.getcwd(),
651 defaultFile= self.imagename, wildcard="png|*.png", style=wx.SAVE | wx.OVERWRITE_PROMPT
653 dlg.SetFilterIndex(2)
655 if dlg.ShowModal() == wx.ID_OK:
657 copyfile(self.imageFile, path)
660 def progressbar(self, maxi) :
661 if 'parent' in dir(self) :
665 return wx.ProgressDialog("Traitements",
666 "Veuillez patienter...",
669 style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_ELAPSED_TIME | wx.PD_CAN_ABORT
673 def treat_var_mod(variables) :
675 variables = list(set(variables))
676 varmod = [variable.split('_') for variable in variables]
677 vars = list(set([var[0] for var in varmod if len(var) >=2]))
679 mods = ['_'.join(v) for v in varmod if v[0] == var]
682 # for variable in variables :
683 # if u'_' in variable :
684 # forme = variable.split(u'_')
687 # if not var in var_mod :
688 # var_mod[var] = [variable]
690 # if not mod in var_mod[var] :
691 # var_mod[var].append(variable)
694 def doconcorde(corpus, uces, mots, uci = False) :
696 ucestxt1 = [row for row in corpus.getconcorde(uces)]
698 ucestxt1 = [row for row in corpus.getuciconcorde(uces)]
699 ucestxt1 = dict(ucestxt1)
702 listmot = [corpus.getlems()[lem].formes for lem in mots]
703 listmot = [corpus.getforme(fid).forme for lem in listmot for fid in lem]
704 mothtml = ['<font color=red><b>'+mot+'</b></font>' for mot in listmot]
705 dmots = dict(zip(listmot, mothtml))
707 ucetxt = ucestxt1[uce].split()
708 ucetxt = ' '.join([dmots.get(mot, mot) for mot in ucetxt])
710 ucis_txt.append('<p><b>' + ' '.join(corpus.ucis[corpus.getucefromid(uce).uci].etoiles) + '</b></p>')
712 ucis_txt.append('<p><b>' + ' '.join(corpus.ucis[uce].etoiles) + '</b></p>')
713 ucestxt.append(ucetxt)
714 return ucis_txt, ucestxt
717 def getallstcarac(corpus, analyse) :
718 pathout = PathOut(analyse['ira'])
719 profils = ReadProfileAsDico(pathout['PROFILE_OUT'], Alceste, self.encoding)