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
f.write(txt)
pid = exec_rcode(self.ira.RPath, filetmp)
check_Rresult(self.ira, pid)
f.write(txt)
pid = exec_rcode(self.ira.RPath, filetmp)
check_Rresult(self.ira, pid)
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
ira = wx.GetApp().GetTopWindow()
tgenpath = os.path.join(parametres['pathout'], 'tgen.csv')
self.page.tgens, etoiles = ReadList(parametres['tgenspec'], ira.syscoding, sep="\t")
ira = wx.GetApp().GetTopWindow()
tgenpath = os.path.join(parametres['pathout'], 'tgen.csv')
self.page.tgens, etoiles = ReadList(parametres['tgenspec'], ira.syscoding, sep="\t")
tgen.read()
tgenlempath = os.path.join(parametres['pathout'], 'tgenlemchi2.csv')
if os.path.exists(tgenlempath) :
tgen.read()
tgenlempath = os.path.join(parametres['pathout'], 'tgenlemchi2.csv')
if os.path.exists(tgenlempath) :
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])])
""" % (ffr(self.dictpathout['RData.RData']), ffr(self.ira.RscriptsPath['Rgraph']), ffr(fileout), width, height, svg, type_dendro, bw)
tmpfile = tempfile.mktemp()
# ecriture du fichier de script à éxécuter
""" % (ffr(self.dictpathout['RData.RData']), ffr(self.ira.RscriptsPath['Rgraph']), ffr(fileout), width, height, svg, type_dendro, bw)
tmpfile = tempfile.mktemp()
# ecriture du fichier de script à éxécuter
f.write(txt)
exec_rcode(self.ira.RPath, filetmp)
GraphToJson(nodesfile, edgesfile, jsonout)
f.write(txt)
exec_rcode(self.ira.RPath, filetmp)
GraphToJson(nodesfile, edgesfile, jsonout)
#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) :
+ self.tableau.read_tableau(self.pathout['analyse.db'])
+ TabCate = ElCategorizator(self.ira.nb, self.pathout, self.tableau)
+ self.ira.nb.AddPage(TabCate, ' - '.join([_('ElCaTeGoRiZaToR'), self.parametres['name']]))
actives = [[val, self.tableau.actives[val]] for val in self.tableau.actives]
#self.tableau.make_listactives()
actives = dict([[i, val] for i, val in enumerate(actives)])
actives = [[val, self.tableau.actives[val]] for val in self.tableau.actives]
#self.tableau.make_listactives()
actives = dict([[i, val] for i, val in enumerate(actives)])
#dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)])
self.dial = PrefSimi(self.parent, -1, self.parametres, self.indices, wordlist = actives, selected = selected, actives = self.tableau.listactives)
self.dial.CenterOnParent()
#dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)])
self.dial = PrefSimi(self.parent, -1, self.parametres, self.indices, wordlist = actives, selected = selected, actives = self.tableau.listactives)
self.dial.CenterOnParent()
indexes.append(self.dial.listcol.getColumnText(last,0))
self.column = [self.tableau.listactives.index(val) for val in indexes]
self.column.sort()
indexes.append(self.dial.listcol.getColumnText(last,0))
self.column = [self.tableau.listactives.index(val) for val in indexes]
self.column.sort()
#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)