projects
/
iramuteq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
memory
[iramuteq]
/
textwordcloud.py
diff --git
a/textwordcloud.py
b/textwordcloud.py
index
908ba89
..
fab7c5a
100644
(file)
--- a/
textwordcloud.py
+++ b/
textwordcloud.py
@@
-2,17
+2,17
@@
# -*- coding: utf-8 -*-
#Author: Pierre Ratinaud
#Copyright (c) 2008-2009 Pierre Ratinaud
# -*- coding: utf-8 -*-
#Author: Pierre Ratinaud
#Copyright (c) 2008-2009 Pierre Ratinaud
-#Li
s
ense: GNU/GPL
+#Li
c
ense: GNU/GPL
from analysetxt import AnalyseText
from guifunct import getPage, getCorpus, SelectColumn
from analysetxt import AnalyseText
from guifunct import getPage, getCorpus, SelectColumn
-from ConfigParser import RawConfigParser
-from functions import sortedby, progressbar
, CreateIraFile, exec_rcode, check_Rresult, MessageImage
+
#
from ConfigParser import RawConfigParser
+from functions import sortedby, progressbar
from dialog import StatDialog, PrefWordCloud
from PrintRScript import WordCloudRScript
#from ttparser import *
import tempfile
from dialog import StatDialog, PrefWordCloud
from PrintRScript import WordCloudRScript
#from ttparser import *
import tempfile
-from time import sleep
+
#
from time import sleep
import wx
import os
import logging
import wx
import os
import logging
@@
-43,8
+43,8
@@
class WordCloud(AnalyseText):
else :
return 'NOK'
else :
return 'NOK'
- def make_option(self) :
- dial = PrefWordCloud(self.ira)
+ def make_option(self
, fromcluster = False
) :
+ dial = PrefWordCloud(self.ira
, fromcluster
)
dial.CenterOnParent()
res = dial.ShowModal()
if res == wx.ID_OK :
dial.CenterOnParent()
res = dial.ShowModal()
if res == wx.ID_OK :
@@
-61,6
+61,8
@@
class WordCloud(AnalyseText):
self.parametres['col_bg'] = dial.color_bg.GetColour()
self.parametres['mode'] = dial.typeformeschoice.GetSelection()
self.parametres['svg'] = svg
self.parametres['col_bg'] = dial.color_bg.GetColour()
self.parametres['mode'] = dial.typeformeschoice.GetSelection()
self.parametres['svg'] = svg
+ if fromcluster :
+ self.parametres['indice'] = dial.indice.GetSelection()
outgraph = os.path.join(os.path.dirname(self.pathout['zipf.png']), 'nuage_')
nb = 1
if svg :
outgraph = os.path.join(os.path.dirname(self.pathout['zipf.png']), 'nuage_')
nb = 1
if svg :
@@
-84,11
+86,11
@@
class ClusterCloud(WordCloud) :
self.parametres['type'] = 'clustercloud'
#FIXME
limit = 2
self.parametres['type'] = 'clustercloud'
#FIXME
limit = 2
- res = self.make_option()
+ res = self.make_option(
True
)
if res == wx.ID_OK :
prof = self.parametres['clusterprof']
del self.parametres['clusterprof']
if res == wx.ID_OK :
prof = self.parametres['clusterprof']
del self.parametres['clusterprof']
- if self.parametres
.get('unit', 0)
== 0 :
+ if self.parametres
['indice']
== 0 :
tokeep = 1
else :
tokeep = 2
tokeep = 1
else :
tokeep = 2