X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textsimi.py;h=0bebb958d5f3e120e11b0b50bb35aea94b1372ff;hp=dc75f6e74e916c7332dfa2fdedd5f50be39dd24b;hb=ad8fe486b34f1cee918ea8564bf909e30cd25328;hpb=be2de22859c8f59abe9e1082981e4c3a62e9b7ca diff --git a/textsimi.py b/textsimi.py index dc75f6e..0bebb95 100644 --- a/textsimi.py +++ b/textsimi.py @@ -20,7 +20,7 @@ from copy import copy import logging -logger = logging.getLogger('iramuteq.textsimi') +log = logging.getLogger('iramuteq.textsimi') class SimiTxt(AnalyseText): def doanalyse(self) : @@ -48,7 +48,8 @@ class SimiTxt(AnalyseText): self.makefiles() script = PrintSimiScript(self) script.make_script() - if not self.doR(script.scriptout) : + if not self.doR(script.scriptout, dlg = self.dlg, message = 'R...') : + log.info('Problem') return False if self.parametres['type_graph'] == 1: if os.path.exists(self.pathout['liste_graph']): @@ -60,21 +61,21 @@ class SimiTxt(AnalyseText): else : return False - def preferences(self) : - dial = StatDialog(self, self.parent) - dial.CenterOnParent() - val = dial.ShowModal() - if val == 5100 : - if dial.radio_lem.GetSelection() == 0 : - lem = 1 - else : - lem = 0 - self.parametres['lem'] = lem - dial.Destroy() - return self.parametres - else : - dial.Destroy() - return None +# def preferences(self) : +# dial = StatDialog(self, self.parent) +# dial.CenterOnParent() +# val = dial.ShowModal() +# if val == 5100 : +# if dial.radio_lem.GetSelection() == 0 : +# lem = 1 +# else : +# lem = 0 +# self.parametres['lem'] = lem +# dial.Destroy() +# return self.parametres +# else : +# dial.Destroy() +# return None def makesimiparam(self) : self.paramsimi = {'coeff' : 0, @@ -120,14 +121,12 @@ class SimiTxt(AnalyseText): with open(self.pathout['actives.csv'], 'w') as f : f.write('\n'.join(self.actives).encode(self.ira.syscoding)) - - class SimiFromCluster(SimiTxt) : def __init__(self, ira, corpus, actives, numcluster, parametres = None, dlg = False) : self.actives = actives self.numcluster = numcluster parametres['name'] = 'simi_classe_%i' % (numcluster + 1) - SimiTxt.__init__(self, ira, corpus, parametres, dlg) + SimiTxt.__init__(self, ira, corpus, parametres, dlg, lemdial = False) def preferences(self) : return self.parametres @@ -157,7 +156,7 @@ class SimiFromCluster(SimiTxt) : self.makefiles() script = PrintSimiScript(self) script.make_script() - if self.doR(script.scriptout) : + if not self.doR(script.scriptout, dlg = self.dlg, message = 'R ...') : return False if self.parametres['type_graph'] == 1: if os.path.exists(self.pathout['liste_graph']):