X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=profile_segment.py;h=e0f68b8b0daaeb7eca72de1461dac34c30e6b0b3;hp=b7e1f24ca1f7049f7fc588e547e7deba37ef9e4c;hb=2560c66bef5e023dbce18c556363ec956bd15e47;hpb=69b6d701d4298a125c51cd0ac8e884359f93a6ad diff --git a/profile_segment.py b/profile_segment.py index b7e1f24..e0f68b8 100644 --- a/profile_segment.py +++ b/profile_segment.py @@ -12,6 +12,7 @@ from functions import exec_rcode, check_Rresult, ReadProfileAsDico, ReadList from listlex import * from dialog import PrefSegProf, PrefProfTypes from time import sleep +from chemins import ffr class ProfileSegment() : def __init__(self, parent, pathout, parametres, corpus) : @@ -46,13 +47,13 @@ class ProfileSegment() : txt = """ load("%s") source("%s") - """ % (self.dictpathout['RData'], self.parent.RscriptsPath['chdfunct']) + """ % (ffr(self.dictpathout['RData']), ffr(self.parent.RscriptsPath['chdfunct'])) txt += """ dt <- read.csv2("%s", row.names = 1) to <- build.pond.prof(dt) PrintProfile(n1,to[4],NULL,to[5],NULL,clnb,"%s","%s") - """ % (self.corpus.dictpathout['segments_classes'], self.dictpathout['prof_seg'], self.dictpathout['antiprof_seg']) + """ % (ffr(self.corpus.dictpathout['segments_classes']), ffr(self.dictpathout['prof_seg']), ffr(self.dictpathout['antiprof_seg'])) fo = tempfile.mktemp(dir=self.parent.TEMPDIR) with open(fo, 'w') as f : f.write(txt) @@ -109,21 +110,21 @@ class ProfilType() : txt = """ load("%s") source("%s") - """ % (self.corpus.dictpathout['RData'], self.parent.RscriptsPath['chdfunct']) + """ % (ffr(self.corpus.dictpathout['RData']), ffr(self.parent.RscriptsPath['chdfunct'])) txt += """ dt <- read.csv2("%s", row.names = 1) - """ % self.corpus.dictpathout['type_cl'] + """ % ffr(self.corpus.dictpathout['type_cl']) if alceste : txt += """ to <- build.pond.prof(dt) PrintProfile(n1,to[4],NULL,to[5],NULL,clnb,"%s","%s") - """ % (self.outprof, self.corpus.dictpathout['antiprof_type']) + """ % (ffr(self.outprof), ffr(self.corpus.dictpathout['antiprof_type'])) else : txt += """ to <- AsLexico2(dt) write.csv2(to[[1]], file = "%s") - """ % (self.outprof) + """ % (ffr(self.outprof)) # write.csv2(to[[3]], file = "%s") # % (self.outprof) fo = tempfile.mktemp(dir=self.parent.TEMPDIR) @@ -146,7 +147,7 @@ class ProfilType() : prof_seg_nb.AddPage(ntab, 'classe %i' % (i + 1)) else : self.DictSpec, first = ReadList(self.outprof) - self.ListPan = ListForSpec(self.parent, self, self.DictSpec, first) + self.ListPan = ListForSpec(self.parent, self, self.DictSpec, first[1:]) prof_seg_nb.AddPage(self.ListPan, u'Spécificités') page.AddPage(prof_seg_nb, u'Profils des types')