X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textstat.py;h=76ecb40463189556cf877a4dbe6dfb53826520aa;hp=f8f3735ad1a50e659fd68828de86c3dee81256a6;hb=fc1209a72127935ef90645314dff26bb6fd2a1d4;hpb=889c0c759bd1a27a90cbf0a1bbb3f080ab293aaf diff --git a/textstat.py b/textstat.py index f8f3735..76ecb40 100644 --- a/textstat.py +++ b/textstat.py @@ -4,7 +4,7 @@ #Copyright (c) 2008-2012 Pierre Ratinaud #License: GNU/GPL -#from chemins import ConstructPathOut, StatTxtPathOut, ffr +from chemins import ffr from chemins import PathOut from analysetxt import AnalyseText #from corpus import Corpus @@ -73,17 +73,17 @@ class Stat(AnalyseText) : txt = """ source("%s") tot <- read.csv2("%s", header = FALSE, row.names = 1) - """ % (self.parent.RscriptsPath['Rgraph'], self.pathout['total.csv']) + """ % (ffr(self.parent.RscriptsPath['Rgraph']), ffr(self.pathout['total.csv'])) if len(hapax) : txt += """ hapax <- read.csv2("%s", header = FALSE, row.names = 1) tot <- rbind(tot, hapax) - """ % self.pathout['hapax.csv'] + """ % ffr(self.pathout['hapax.csv']) txt += """ open_file_graph("%s", width = 400, height = 400) plot(tot[,1], log = 'xy', xlab='log(rangs)', ylab = 'log(frequences)', col = 'red', pch=16) dev.off() - """ % (self.pathout['zipf.png']) + """ % (ffr(self.pathout['zipf.png'])) tmpscript = tempfile.mktemp(dir=self.parent.TEMPDIR) with open(tmpscript, 'w') as f : f.write(txt)