projects
/
iramuteq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0df8fef
)
R 4.3 on windows
author
pierre
<pierre.ratinaud@univ-tlse2.fr>
Sat, 27 Jan 2024 15:28:36 +0000
(16:28 +0100)
committer
pierre
<pierre.ratinaud@univ-tlse2.fr>
Sat, 27 Jan 2024 15:28:36 +0000
(16:28 +0100)
textstat.py
patch
|
blob
|
history
diff --git
a/textstat.py
b/textstat.py
index
1effd2a
..
56e0942
100755
(executable)
--- a/
textstat.py
+++ b/
textstat.py
@@
-88,9
+88,9
@@
class Stat(AnalyseText) :
open_file_graph("%s", width = 400, height = 400)
barplot(table(stsize[,1]))
dev.off()
open_file_graph("%s", width = 400, height = 400)
barplot(table(stsize[,1]))
dev.off()
- """ % (
self.pathout['stsize.csv'], self.pathout['segments_size.png']
)
+ """ % (
ffr(self.pathout['stsize.csv']), ffr(self.pathout['segments_size.png'])
)
tmpscript = tempfile.mktemp(dir=self.parent.TEMPDIR)
tmpscript = tempfile.mktemp(dir=self.parent.TEMPDIR)
- with open(tmpscript, 'w') as f :
+ with open(tmpscript, 'w'
, encoding='utf8'
) as f :
f.write(txt)
pid = exec_rcode(self.parent.RPath, tmpscript, wait = False)
while pid.poll() == None :
f.write(txt)
pid = exec_rcode(self.parent.RPath, tmpscript, wait = False)
while pid.poll() == None :
@@
-104,8
+104,8
@@
class Stat(AnalyseText) :
if key != 'glob' :
dico = self.result[key]
toprint = [[dico[val][0],repr(dico[val][1]), dico[val][2]] for val in dico]
if key != 'glob' :
dico = self.result[key]
toprint = [[dico[val][0],repr(dico[val][1]), dico[val][2]] for val in dico]
- with open(self.pathout['%s.csv' % key], 'w') as f :
+ with open(self.pathout['%s.csv' % key], 'w'
, encoding='utf8'
) as f :
f.write('\n'.join([';'.join([val for val in ligne]) for ligne in toprint]))
else :
f.write('\n'.join([';'.join([val for val in ligne]) for ligne in toprint]))
else :
- with open(self.pathout['%s.txt' % 'glob'], 'w') as f :
+ with open(self.pathout['%s.txt' % 'glob'], 'w'
, encoding='utf8'
) as f :
f.write(self.result['glob'])
f.write(self.result['glob'])