- elif self.conf['type'] == 'simitxt' :
- self.tableau = Tableau(self.parent, self.conf['ira'])
- self.DictPathOut=construct_simipath(self.conf['pathout'])
- self.tableau.dictpathout = self.DictPathOut
- self.tableau.read_tableau(self.tableau.dictpathout['db'])
- if self.tableau.parametre.get('corpus', False) :
- self.corpus=corpus
- #self.corpus.read_corpus_from_shelves(self.DictPathOut['corpus'])
- self.corpus.parametres['openpath'] = self.conf['pathout']
- self.parent.ShowMenu(_("Text analysis"))
- DoSimi(self.parent, self.conf, isopen = True, filename = self.conf['ira'], gparent = self, openfromprof=False)
-
- print 'simi'
-# try :
-# #if self.conf['type'] in ['analyse','lexico','stat','wordcloud'] :
-# # self.corpus = Corpus(parent)
-# if 'analyse' in self.conf.sections() :
-# DictPathOut=ChdTxtPathOut(os.path.dirname(filename))
-# self.pathout = os.path.dirname(filename)
-# self.DictPathOut=DictPathOut
-# #self.corpus = Corpus(parent)
-# self.corpus.dictpathout = self.DictPathOut
-# self.corpus.read_corpus_from_shelves(self.DictPathOut['db'])
-# self.corpus.parametre['analyse'] = 'alceste'
-# self.corpus.make_lem_type_list()
-# # print 'EXTRACT NR'
-# # self.corpus.extractnr()
-# Alceste=True
-# #self.corpus.save_corpus(self.corpus.dictpathout['db'])
-# #self.corpus.make_uci_stat()
-# #self.corpus.make_et_table()
-# #self.corpus.prof_type()
-# #self.corpus.make_type_tot()
-# #self.corpus.make_size_uci()
-# #self.corpus.get_stat_by_cluster()
-# OpenCHDS(parent, self, filename, Alceste)
-# self.parent.ShowMenu(_("Text analysis"))
-# self.parent._mgr.Update()
-# elif 'questionnaire' in self.conf.sections() :
-# self.DictPathOut=ChdTxtPathOut(os.path.dirname(filename))
-# self.pathout = os.path.dirname(filename)
-# self.tableau = Tableau(parent, filename)
-# self.tableau.dictpathout = self.DictPathOut
-# self.tableau.read_tableau(self.tableau.dictpathout['db'])
-# OpenCHDS(parent, self, filename, False)
-# elif 'simi' in self.conf.sections():
-# self.tableau = Tableau(parent, filename)
-# self.DictPathOut=construct_simipath(os.path.abspath(os.path.dirname(filename)))
-# self.tableau.dictpathout = self.DictPathOut
-# self.tableau.read_tableau(self.tableau.dictpathout['db'])
-# if self.tableau.parametre.get('fromtxt', False) :
-# self.corpus=Corpus(parent)
-# self.corpus.read_corpus_from_shelves(self.DictPathOut['corpus'])
-# self.corpus.parametre['openpath'] = os.path.dirname(filename)
-# self.parent.ShowMenu(_("Text analysis"))
-# DoSimi(parent, self.conf, isopen = True, filename = filename, gparent = self, openfromprof=simifromprof)
-# elif 'lexico' in self.conf.sections():
-# print 'lexico'
-# #self.corpus = Corpus(parent)
-# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename))
-# self.parent.ShowMenu(_("Text analysis"))
-# dolexlayout(parent, self, filename)
-# elif 'stat' in self.conf.sections():
-# print 'stat'
-# #self.corpus = Corpus(parent)
-# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename))
-# self.parent.ShowMenu(_("Text analysis"))
-# StatLayout(parent, self, filename)
-# elif 'chd_dist_quest' in self.conf.sections():
-# self.DictPathOut = ChdTxtPathOut(os.path.dirname(filename))
-# self.pathout = os.path.dirname(filename)
-# self.tableau = Tableau(parent, filename)
-# self.tableau.dictpathout = self.DictPathOut
-# self.tableau.read_tableau(self.tableau.dictpathout['db'])
-# OpenCHDS(parent, self, filename, False)
-# elif 'wordcloud' in self.conf.sections() :
-# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename))
-# self.corpus.read_corpus_from_shelves(self.corpus.dictpathout['db'])
-# self.parent.ShowMenu(_("Text analysis"))
-# WordCloudLayout(parent, self, filename)
-# if self.conf.sections()[0] in ['analyse','lexico','stat','wordcloud'] :
-# self.corpus.parametre['openpath'] = os.path.dirname(filename)
-# except :
-# BugReport(self.parent)
-
-
+ elif self.conf['type'] == 'simitxt' or self.conf['type'] == 'clustersimitxt' :
+ SimiLayout(self.parent, corpus, self.conf)
+ elif self.conf['type'] == 'wordcloud' or self.conf['type'] == 'clustercloud':
+ WordCloudLayout(self.parent, corpus, self.conf)
+ elif self.conf['type'] == 'reinertmatrix' :
+ OpenCHDS(self.parent, corpus, self.conf, Alceste = False)
+ elif self.conf['type'] == 'simimatrix' or self.conf['type'] == 'simiclustermatrix':
+ SimiMatLayout(self.parent, corpus, self.conf)
+ elif self.conf['type'] == 'proto' :
+ ProtoLayout(self.parent, corpus, self.conf)
+ elif self.conf['type'] == 'matrix' :
+ MatLayout(self.parent, corpus)
+ elif self.conf['type'] == 'freq' or self.conf['type'] == 'freqmulti':
+ FreqLayout(self.parent, corpus, self.conf)
+ elif self.conf['type'] == 'chi2' :
+ Chi2Layout(self.parent, corpus, self.conf)
+