X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=openanalyse.py;h=1c5a5541d53f604a9e392453b2678c276f2140c7;hp=c55fef3ef3368f73079877c79bb03d6244db5328;hb=9bde3d55d2131f1a33234a43c0de8b200ddb8f9a;hpb=9fbe978a9b2734bd17d10721a44016cc0ac97153 diff --git a/openanalyse.py b/openanalyse.py index c55fef3..1c5a554 100644 --- a/openanalyse.py +++ b/openanalyse.py @@ -33,12 +33,22 @@ class OpenAnalyse(): if self.conf['type'] == 'corpus' : corpus = self.opencorpus() elif self.conf['corpus'] in self.parent.history.corpus : + print 'corpus in history.corpus' + if self.conf['uuid'] in self.parent.history.analyses : + intree = True + else : + intree = False corpus = self.openanalyse() if self.conf.get('lem',1) : corpus.make_lems(True) else : corpus.make_lems(False) self.doopen(corpus) + if not intree : + self.parent.tree.AddAnalyse(self.conf) + else : + print 'passe apr la' + print self.parent.tree.GiveFocus(uuid = self.conf['uuid'], bold = True) else : corpus = None self.parent.history.addtab(self.conf) @@ -83,6 +93,7 @@ class OpenAnalyse(): if os.path.exists(self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']) : corpus = Corpus(self, parametres = DoConf(self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']).getoptions('corpus'), read = self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']) self.parent.history.openedcorpus[self.conf['corpus']] = corpus + self.parent.history.add(self.conf) return corpus def doopen(self, corpus) : @@ -98,9 +109,10 @@ class OpenAnalyse(): elif self.conf['type'] == 'alceste' : self.parent.ShowMenu(_("Text analysis")) OpenCHDS(self.parent, corpus, self.conf, Alceste = True) - elif self.conf['type'] == 'simitxt' : + elif self.conf['type'] == 'simitxt' or self.conf['type'] == 'clustersimitxt' : self.parent.ShowMenu(_("Text analysis")) SimiLayout(self.parent, corpus, self.conf) elif self.conf['type'] == 'wordcloud' : self.parent.ShowMenu(_("Text analysis")) WordCloudLayout(self.parent, corpus, self.conf) +