from search_tools import SearchFrame
from dialog import PrefGraph, PrefExport, PrefSimpleFile, PrefDendro, SimpleDialog, ImageViewer
from guifunct import SelectColumn, PrepSimi, PrefSimi, redosimi
from search_tools import SearchFrame
from dialog import PrefGraph, PrefExport, PrefSimpleFile, PrefDendro, SimpleDialog, ImageViewer
from guifunct import SelectColumn, PrepSimi, PrefSimi, redosimi
for i in range(0, clnb) :
clusternames[i] = ' '.join(['%i' % (i + 1), _('Cluster'), '%i' % (i + 1)])
if os.path.exists(self.pathout['classes_names.txt']) :
for i in range(0, clnb) :
clusternames[i] = ' '.join(['%i' % (i + 1), _('Cluster'), '%i' % (i + 1)])
if os.path.exists(self.pathout['classes_names.txt']) :
clusternames_ = f.read()
clusternames_ = dict([[i, ' '.join([repr(i + 1), line])] for i, line in enumerate(clusternames_.splitlines())])
clusternames.update(clusternames_)
clusternames_ = f.read()
clusternames_ = dict([[i, ' '.join([repr(i + 1), line])] for i, line in enumerate(clusternames_.splitlines())])
clusternames.update(clusternames_)
panel = wx.Panel(parent, -1)
sizer1 = wx.BoxSizer(wx.VERTICAL)
if os.path.exists(DictPathOut['pre_rapport']):
panel = wx.Panel(parent, -1)
sizer1 = wx.BoxSizer(wx.VERTICAL)
if os.path.exists(DictPathOut['pre_rapport']):
self.parametres['tgenspec'] = os.path.join(self.parametres['pathout'], 'tgenchi2.csv')
TgenLayout(panel)
if os.path.exists(self.dictpathout['translations.txt']) :
self.parametres['tgenspec'] = os.path.join(self.parametres['pathout'], 'tgenchi2.csv')
TgenLayout(panel)
if os.path.exists(self.dictpathout['translations.txt']) :
def opentrans(self, trans) :
prof = ReadProfileAsDico(self.dictpathout[trans[0]], False)
def opentrans(self, trans) :
prof = ReadProfileAsDico(self.dictpathout[trans[0]], False)
txt += ''.join([sep, '###########################', sep, _('time'), ' : %s' % parametres.get('time', ''), sep, '###########################', sep])
# ecriture du resultat dans le fichier
txt += ''.join([sep, '###########################', sep, _('time'), ' : %s' % parametres.get('time', ''), sep, '###########################', sep])
# ecriture du resultat dans le fichier
self.dictpathout = StatTxtPathOut(parametres['pathout'])
#self.corpus.read_corpus_from_shelves(self.corpus.dictpathout['db'])
self.parent = ira
self.dictpathout = StatTxtPathOut(parametres['pathout'])
#self.corpus.read_corpus_from_shelves(self.corpus.dictpathout['db'])
self.parent = ira
self.encoding = self.corpus.parametres['syscoding']
self.parametres = parametres
self.DictSpec, first = ReadList(self.dictpathout['tablespecf'], self.corpus.parametres['syscoding'])
self.encoding = self.corpus.parametres['syscoding']
self.parametres = parametres
self.DictSpec, first = ReadList(self.dictpathout['tablespecf'], self.corpus.parametres['syscoding'])
lcle = {'total' :'total.csv', 'formes_actives':'formes_actives.csv', 'formes_supplémentaires':'formes_supplémentaires.csv', 'hapax': 'hapax.csv'}
self.result = {}
for key in lcle :
lcle = {'total' :'total.csv', 'formes_actives':'formes_actives.csv', 'formes_supplémentaires':'formes_supplémentaires.csv', 'hapax': 'hapax.csv'}
self.result = {}
for key in lcle :
self.result[key] = [line.split(';') for line in f.read().splitlines()]
self.result[key] = dict([[i,[line[0],int(line[1]), line[2]]] for i, line in enumerate(self.result[key])])
self.result[key] = [line.split(';') for line in f.read().splitlines()]
self.result[key] = dict([[i,[line[0],int(line[1]), line[2]]] for i, line in enumerate(self.result[key])])
#saveAsGEXF(graph, filepath = fileout)
""" % (ffr(self.pathout['RData.RData']), ffr(self.parent.RscriptsPath['simi']), fileout)
filetmp = tempfile.mktemp()
#saveAsGEXF(graph, filepath = fileout)
""" % (ffr(self.pathout['RData.RData']), ffr(self.parent.RscriptsPath['simi']), fileout)
filetmp = tempfile.mktemp()
f.write(txt)
exec_rcode(self.ira.RPath, filetmp)
mss = wx.MessageDialog(self.ira, fileout, _('File exported'), wx.OK)
f.write(txt)
exec_rcode(self.ira.RPath, filetmp)
mss = wx.MessageDialog(self.ira, fileout, _('File exported'), wx.OK)
+class CateLayout(DefaultMatLayout) :
+
+ def dolayout(self) :
+ TabCate = ElCategorizator(self.ira.nb, self.pathout, self.tableau)
+ self.ira.nb.AddPage(TabCate, ' - '.join([_('ElCaTeGoRiZaToR'), self.parametres['name']]))