X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textwordcloud.py;h=01ccf9ac6e4d93ac61b5f9a0e0a026f5d1485d1d;hp=b31e94050a13cdff7d60c98098933401f1fef187;hb=a503f041dc4947ee21c1d353ddd05ddb13a5e322;hpb=c5650ea708101e654d8851350494c0e9a712b6ed diff --git a/textwordcloud.py b/textwordcloud.py index b31e940..01ccf9a 100644 --- a/textwordcloud.py +++ b/textwordcloud.py @@ -4,8 +4,6 @@ #Copyright (c) 2008-2009 Pierre Ratinaud #Lisense: GNU/GPL -from chemins import ConstructPathOut, StatTxtPathOut, ffr, FFF -#from corpus import Corpus from analysetxt import AnalyseText from guifunct import getPage, getCorpus, SelectColumn from ConfigParser import RawConfigParser @@ -28,7 +26,13 @@ class WordCloud(AnalyseText): def doanalyse(self) : self.parametres['type'] = 'wordcloud' #FIXME - self.actives = self.corpus.make_actives_limit(3) + limit = 3 + mode = 'both' + if mode == 'both' : + self.actives = self.corpus.make_actives_limit(limit, 1) + self.actives += self.corpus.make_actives_limit(limit, 2) + elif mode == 'act' : + self.actives = self.corpus.make_actives_limit(limit, 1) dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv']) self.make_option() @@ -45,6 +49,7 @@ class WordCloud(AnalyseText): self.parametres['width'] = dial.spin_L.GetValue() self.parametres['height'] = dial.spin_H.GetValue() #maxword = dial.spin_maxword.GetValue() + self.parametres['maxword'] = dial.spin_maxword.GetValue() self.parametres['mincex'] = float(dial.spin_mincex.GetValue())/float(10) self.parametres['maxcex'] = float(dial.spin_maxcex.GetValue())/float(10) self.parametres['col_text'] = dial.color_text.GetColour()