plot(tree.cut2$tree.cl)
dev.off()
open_file_graph("%s", width = 600, height=400)
- plot(tree.cut1$dendro_tot_cl)
+ plot(tree.cut2$dendro_tot_cl)
dev.off()
""" % (ffr(DicoPath['dendro2']), ffr(DicoPath['arbre2']))
colnames(result) <- colnames(tgen)
row.names(result) <- rownames(tgen)
write.table(result, file = "%s", sep='\\t', col.names = NA)
- """ % self.pathout['tgenspec.csv']
+ """ % ffr(self.pathout['tgenspec.csv'])
self.add(txt)
+class FreqMultiScript(PrintRScript):
+ def make_script(self):
+ self.sources([self.analyse.parent.RscriptsPath['Rgraph']])
+ txt = """
+ freq <- read.csv2("%s", row.names=1, sep='\\t', dec='.')
+ """ % ffr(self.pathout['frequences.csv'])
+ txt += """
+ toplot <- freq[order(freq[,2]) ,2]
+ toplot.names = rownames(freq)[order(freq[,2])]
+ h <- 80 + (20 * nrow(freq))
+ open_file_graph("%s",height=h, width=500)
+ par(mar=c(3,20,3,3))
+ barplot(toplot, names = toplot.names, horiz=TRUE, las =1, col = rainbow(nrow(freq)))
+ dev.off()
+ """ % ffr(self.pathout['barplotfreq.png'])
+ txt += """
+ toplot <- freq[order(freq[,4]) ,4]
+ toplot.names = rownames(freq)[order(freq[,4])]
+ open_file_graph("%s",height=h, width=500)
+ par(mar=c(3,20,3,3))
+ barplot(toplot, names = toplot.names, horiz=TRUE, las =1, col = rainbow(nrow(freq)))
+ dev.off()
+ """ % ffr(self.pathout['barplotrow.png'])
+ self.add(txt)
+ self.write()
\ No newline at end of file
self.dlg = dlg
self.parametres = parametres
self.val = False
- self.parametres['pathout'] = PathOut(tableau.parametres['originalpath'], analyse_type = self.parametres['type'], dirout = tableau.parametres['pathout']).mkdirout()
+ print self.parametres
if not 'pathout' in self.parametres :
- self.pathout = PathOut(tableau.parametres['originalpath'], analyse_type = self.parametres['type'], dirout = tableau.parametres['pathout'])
+ self.parametres['pathout'] = PathOut(tableau.parametres['originalpath'], analyse_type = self.parametres['type'], dirout = tableau.parametres['pathout']).mkdirout()
+ print self.parametres
+ self.pathout = PathOut(analyse_type = self.parametres['type'], dirout = self.parametres['pathout'])
+ print self.pathout.dirout
else :
self.pathout = PathOut(filename = tableau.parametres['originalpath'], dirout = self.parametres['pathout'], analyse_type = self.parametres['type'])
else :
result_analyse = False
if result_analyse is None :
- self.time = time() - self.t1
- minutes, seconds = divmod(self.time, 60)
- hours, minutes = divmod(minutes, 60)
- self.parametres['time'] = '%.0fh %.0fm %.0fs' % (hours, minutes, seconds)
- self.parametres['ira'] = self.pathout['Analyse.ira']
- DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira'])
- self.ira.history.addMatrixAnalyse(self.parametres)
+ if self.parametres.get('tohistory', True) :
+ self.time = time() - self.t1
+ minutes, seconds = divmod(self.time, 60)
+ hours, minutes = divmod(minutes, 60)
+ self.parametres['time'] = '%.0fh %.0fm %.0fs' % (hours, minutes, seconds)
+ self.parametres['ira'] = self.pathout['Analyse.ira']
+ DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira'])
+ self.ira.history.addMatrixAnalyse(self.parametres)
if self.dlg is not None :
self.dlg.Destroy()
- OpenAnalyse(self.parent, self.parametres['ira'])
- self.ira.tree.AddMatAnalyse(self.parametres)
+ if self.parametres.get('tohistory', True) :
+ OpenAnalyse(self.parent, self.parametres['ira'])
+ self.ira.tree.AddMatAnalyse(self.parametres)
self.val = 5100
else :
self.val = False
ConfigPath = os.path.join(AppliPath, 'configuration')
DictConfigPath = {
'global': os.path.join(ConfigPath, 'global.cfg'),
+ 'preferences': os.path.join(ConfigPath, 'iramuteq.cfg'),
}
return DictConfigPath
author = Pierre Ratinaud
gpl-fr = gpl-2.0-fr.txt
dev = Pierre Ratinaud (Université de Toulouse - Laboratoire LERASS - ratinaud@univ-tlse2.fr);Sébastien Déjean (Université de Toulouse);David Skalinder (Mash Strategy - davids@mash.uk.com);
-version = 0.6 alpha 4
+version = 0.6 alpha 10
licence = GNU GPL (v2)
-version_nb = 0.6.a4
\ No newline at end of file
+version_nb = 0.6.a10
\ No newline at end of file
guilanguage=french
R_mem = false
R_max_mem = 1535
-version_nb = 0.6.a4
+version_nb = 0.6.a10
rlibs = false
libsvdc = false
libsvdc_path = /usr/bin/svd
-rmirror = http://cran.univ-lyon1.fr
+rmirror = http://cran.rstudio.com/
parametres = dial.doparametres()
parametres['originalpath'] = parent.filename
PathOut().createdir(parametres['pathout'])
- ReadLexique(self.parent, lang = parametres['lang'])
+ if parametres.get('dictionary', False) :
+ filein = parametres['dictionary']
+ else :
+ filein = None
+ dial.Destroy()
+ ReadLexique(self.parent, lang = parametres['lang'], filein = filein)
if parametres['lang'] != 'other' and os.path.exists(self.parent.DictPath.get(parametres['lang']+'_exp', 'french_exp')):
self.parent.expressions = ReadDicoAsDico(self.parent.DictPath.get(parametres['lang']+'_exp', 'french_exp'))
else :
self.parent.expressions = {}
self.parametres = parametres
else :
+ dial.Destroy()
if self.dlg is not None :
self.dlg.Destroy()
- dial.Destroy()
def doanalyse(self) :
return BuildFromAlceste(self.parent.filename, self.parametres, self.parent.lexique, self.parent.expressions, dlg = self.dlg).corpus
class CorpusPref ( wx.Dialog ):
def __init__( self, parent, parametres ):
- wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+ wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE | wx.STAY_ON_TOP )
self.parent = parent
- langues_n = [u'français', u'english', u'german (expérimentale)', u'italian', u'swedish (expérimentale)', u'portuguese (expérimentale)', u'spanish (expérimentale)', u'greek (expériementale)', u'galician (expérimentale)', u'autre...']
+ langues_n = [u'français', u'english', u'german (expérimentale)', u'italian', u'swedish (expérimentale)', u'portuguese', u'spanish (expérimentale)', u'greek (expériementale)', u'galician (expérimentale)', u'autre...']
self.langues = [u'french', u'english', u'german', u'italian', u'swedish', u'portuguese', u'spanish', u'greek', u'galician', u'other']
self.encodages = [enc[0].lower() for enc in encodages]
fgSizer5.Add( self.radio_other_dict, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.otherdictpath = wx.FilePickerCtrl( self.m_panel1, wx.ID_ANY, wx.EmptyString, _(u"Select a file").decode('utf8'), u"*.*", wx.DefaultPosition, wx.Size( 300,-1 ), wx.FLP_DEFAULT_STYLE )
+ self.otherdictpath.SetMinSize(wx.Size(300, -1))
fgSizer5.Add( self.otherdictpath, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+ self.otherdictpath.Enable( False )
bSizer2.Add( fgSizer5, 1, wx.EXPAND, 5 )
# Connect Events
self.Bind(wx.EVT_BUTTON, self.OnChangeDir, self.m_button1)
self.lang_choices.Bind( wx.EVT_CHOICE, self.OnChangeLangage )
- self.radio_other_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice )
+ self.radio_other_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice )
+ self.radio_default_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice )
+ self.otherdictpath.Bind( wx.EVT_FILEPICKER_CHANGED, self.selectdict)
self.setparametres(parametres)
self.SetSizer( bSizer1 )
self.check_tirets.SetValue(parametres['tiret'])
self.check_tolist.SetValue(parametres['tolist'])
self.check_ponct.SetValue(parametres['keep_ponct'])
+ self.defaultdictpath.SetValue(self.langues[0])
def doparametres(self) :
parametres = {}
parametres['tiret'] = self.check_tirets.GetValue()
parametres['tolist'] = self.check_tolist.GetValue()
parametres['keep_ponct'] = self.check_ponct.GetValue()
+ if self.radio_other_dict.GetValue() :
+ parametres['dictionary'] = self.otherdictpath.GetPath()
for val in parametres :
if isinstance(parametres[val], bool) :
if parametres[val] :
return parametres
def OnChangeLangage(self, evt):
- pass
+ self.defaultdictpath.SetValue(self.langues[self.lang_choices.GetSelection()])
def changedictchoice(self, evt):
- pass
+ if self.radio_default_dict.GetValue() :
+ self.otherdictpath.Enable( False )
+ self.m_sdbSizer1OK.Enable( True )
+ else :
+ self.otherdictpath.Enable( True )
+ if self.otherdictpath.GetPath() == '' :
+ self.m_sdbSizer1OK.Enable( False )
+
+ def selectdict(self, evt):
+ if self.otherdictpath.GetPath() != '' :
+ self.m_sdbSizer1OK.Enable( True )
+
class ConcordList(wx.HtmlListBox):
acomodação acomodação nom
acomodações acomodação nom
acomode acomodar ver
+acomodei acomodar ver
acomodem acomodar ver
+acomodo acomodar ver
acomodou acomodar ver
acompanha acompanhar ver
acompanhada acompanhar ver
admirarmos admirar ver
admiras admirar ver
admirasse admirar ver
+admirassem admirar ver
admirativo admirativo adj
admirava admirar ver
admiravam admirar ver
aias aia nom
aida aida nom
aidar aidar nom
+aids aids nom
aidéticas aidético adj
aidético aidético adj
aidéticos aidético adj
analógicas analógico adj
analógico analógico adj
analógicos analógico adj
+anamnese anamnese nom
+anamneses anamnese nom
anamorfose anamorfose nom
anamorfoses anamorfose nom
ananases ananás nom
apavorantes apavorante adj
apavorar apavorar ver
apavoraram apavorar ver
+apavorarei apavorar ver
apavoravam apavorar ver
apavorou apavorar ver
apazigua apaziguar ver
apreenderem apreender ver
apreendesse apreender ver
apreendeu apreender ver
+apreendi apreender ver
apreendia apreender ver
apreendiam apreender ver
apreendida apreender ver
atomizada atomizar ver
atomizadas atomizar ver
atomizado atomizar ver
+atomizador atomizador nom
+atomizadores atomizador nom
atomizados atomizar ver
atomizam atomizar ver
atomizar atomizar ver
autista autista adj
autistas autista adj
auto auto nom
+autoajuda autoajuda nom
autobiografado autobiografar ver
autobiografia autobiografia nom
autobiografias autobiografia nom
autodigestão autodigestão nom
autodisciplina autodisciplina nom
autodomínio autodomínio nom
+autoestima autoestima nom
autoestrada auto-estrada nom
autofagia autofagia nom
autofalência autofalência nom
avassalar avassalar ver
avassalavam avassalar ver
avassalou avassalar ver
+avatar avatar nom
ave ave nom
avecer avecer ver
aveia aveia nom
bala bala nom
balada balada nom
baladas balada nom
+baladeira baladeiro adj
+baladeiro baladeiro adj
balado balar ver
balai balar ver
balaiada balaiada nom
belíssimo belo adj
belíssimos belo adj
bem bem adv
+bem-estar bem-estar nom
bem-vindo bem-vindo adj
bem-vindos bem-vindo adj
bemol bemol adj
berrarei berrar ver
berrava berrar ver
berre berrar ver
+berrei berrar ver
berreiro berreiro nom
berreiros berreiro nom
berreis berrar ver
boiadeiros boiadeiro nom
boiado boiar ver
boiados boiar ver
+boiam boiar ver
boiando boiar ver
boiar boiar ver
boiarem boiar ver
brownianos browniano adj
broxa broxa nom
broxante broxante nom
+broxei broxar ver
+broxo broxar ver
+broxou broxar ver
bruaca bruaca nom
bruacas bruaca nom
brucelose brucelose nom
bull bull nom
bulo bular ver
bulício bulício nom
+bulímica bulímico adj
+bulímico bulimia adj
bum bum ono
bumba bumba nom
bumbar bumbar ver
cabeludas cabeludo adj
cabeludo cabeludo adj
cabeludos cabeludo adj
+cabelão cabelo nom
cabem caber ver
cabemos caber ver
cabendo caber ver
cocula cocular ver
cocuruto cocuruto nom
cocção cocção nom
+cocô cocô nom
codajaense codajaense adj
codeara codear ver
codeína codeína nom
colegienses colegiense adj
coleguinha colega nom
coleguismo coleguismo nom
+coleguismos coleguismo nom
colei colar ver
coleira coleira nom
coleiras coleira nom
compartimentadas compartimentar ver
compartimentado compartimentar ver
compartimentados compartimentar ver
+compartimentalização compartimentalização nom
compartimentando compartimentar ver
compartimentar compartimentar ver
compartimento compartimento nom
coíbem coibir ver
crachá crachá nom
crachás crachá nom
+crack crack nom
cracoviana cracoviana nom
cracídea cracídeo adj
cracídeo cracídeo adj
cuidada cuidado adj
cuidadas cuidado adj
cuidado cuidado nom
+cuidador cuidador nom
+cuidadora cuidador nom
+cuidadoras cuidador nom
+cuidadores cuidador nom
cuidados cuidado nom
cuidadosa cuidadoso adj
cuidadosamente cuidadosamente adv
declamavam declamar ver
declamação declamação nom
declamações declamação nom
+declamo declamar ver
declamou declamar ver
declara declarar ver
declarada declarar ver
desestatização desestatização nom
desestimada desestimar ver
desestimou desestimar ver
+desestimula desestimular ver
+desestimulamos desestimular ver
+desestimulando desestimular ver
desestimulante desestimulante adj
desestimulantes desestimulante adj
+desestimularam desestimular ver
+desestimularei desestimular ver
+desestimularemos desestimular ver
+desestimulará desestimular ver
+desestimularão desestimular ver
+desestimulas desestimular ver
+desestimulei desestimular ver
+desestimulo desestimular ver
+desestimulou desestimular ver
desestruturação desestruturação nom
desestímulo desestímulo nom
desestímulos desestímulo nom
designe designar ver
designem designar ver
designer designer nom
+designers designer nom
designes designar ver
designo designar ver
designou designar ver
desvalorização desvalorização nom
desvalorizações desvalorização nom
desvalorize desvalorizar ver
+desvalorizei desvalorizar ver
desvalorizem desvalorizar ver
desvalorizo desvalorizar ver
desvalorizou desvalorizar ver
direcciones direccionar ver
direccionou direccionar ver
direccionáveis direccionar ver
+direciona direcionar ver
+direcionada direcionar adj
+direcionadas direcionar adj
+direcionado direcionar adj
direcionador direcionador adj
direcionadores direcionador adj
-direcionais direcional adj
-direcional direcional adj
+direcionados direcionar adj
+direcionais direcionar adj
+direcional direcionar adj
+direcionam direcionar ver
direcionamento direcionamento nom
direcionamentos direcionamento nom
+direcionando direcionar ver
+direcionar direcionar ver
+direcionaram direcionar ver
+direcionará direcionar ver
+direcionava direcionar ver
+direcionavam direcionar ver
+direcione direcionar ver
+direcionem direcionar ver
+direciones direcionar ver
+direcionou direcionar ver
directa directo adj
directamente directamente adv
directas directo adj
dissociação dissociação nom
dissociações dissociação nom
dissociem dissociar ver
+dissocio dissociar ver
dissociou dissociar ver
dissociável dissociável adj
dissoluta dissoluto adj
divorciará divorciar ver
divorciasse divorciar ver
divorciassem divorciar ver
+divorciava divorciar ver
divorcie divorciar ver
divorciei divorciar ver
divorcio divorciar ver
drogam drogar ver
drogando drogar ver
drogar drogar ver
+drogarem drogar ver
drogaria drogaria nom
drogarias drogaria nom
drogas droga nom
educo educar ver
educou educar ver
eduque educar ver
+eduquei educar ver
eduquem educar ver
edusp edusp nom
eduz eduzir ver
eletrocardiogramas eletrocardiograma nom
eletrocardiógrafo eletrocardiógrafo nom
eletrocardiógrafos eletrocardiógrafo nom
+eletrochoque eletrochoque nom
+eletrochoques eletrochoque nom
eletrocrômica eletrocrômico adj
eletrocrômicas eletrocrômico adj
eletrocrômico eletrocrômico adj
emagrecido emagrecer ver
emagrecimento emagrecimento nom
emagreça emagrecer ver
+emagreço emagrecer ver
emalhados emalhar ver
emalhar emalhar ver
emalhe emalhar ver
engatando engatar ver
engatar engatar ver
engataram engatar ver
+engataria engatar ver
engatava engatar ver
engatavam engatar ver
engate engate nom
enrolassem enrolar ver
enrolava enrolar ver
enrolavam enrolar ver
+enrolação enrolação nom
enrole enrolar ver
enrolei enrolar ver
enrolo enrolar ver
entrosado entrosar ver
entrosados entrosar ver
entrosamento entrosamento nom
+entrosando entrosar ver
entrosar entrosar ver
entrosaram entrosar ver
entrosarem entrosar ver
entupimentos entupimento nom
entupindo entupir ver
entupir entupir ver
+entupiram entupir ver
entupiu entupir ver
+enturma enturmar ver
enturmado enturmar ver
enturmados enturmar ver
enturmar enturmar ver
ficam ficar ver
ficamos ficar ver
ficando ficar ver
+ficante ficante nom
ficar ficar ver
ficara ficar ver
ficaram ficar ver
fraldinha fralda nom
fraldinhas fralda nom
fraldo fraldar ver
+fraldão fralda nom
framboesa framboesa nom
framboesas framboesa nom
frame frame nom
geria gerir ver
geriam gerir ver
gerias gerir ver
+geriatra geriatra nom
+geriatras geriatra nom
geriatria geriatria nom
gerida gerir ver
geridas gerir ver
imediatamente imediatamente adv
imediatas imediato adj
imediatismo imediatismo nom
+imediatista imediatista adj
imediato imediato adj
imediatos imediato adj
imediação imediação nom
isolarem isolar ver
isolaria isolar ver
isolariam isolar ver
+isolarmos isolar ver
isolas isolar ver
isolasse isolar ver
isolassem isolar ver
manias mania nom
maniates maniatar ver
manicura manicura nom
+manicure manicure nom
+manicures manicure nom
manicuro manicuro nom
manicuros manicuro nom
manicómio manicómio nom
matriculava matricular ver
matriculavam matricular ver
matricule matricular ver
+matriculei matricular ver
matriculem matricular ver
matriculou matricular ver
matricídio matricídio nom
molejo molejo nom
molemente molemente adv
molenga molenga adj
-molengas molenga nom
+molengas molenga adj
molengo molengar ver
molengue molengar ver
moleque moleque nom
mosqueadas mosquear ver
mosqueado mosquear ver
mosqueados mosquear ver
+mosqueira mosqueira nom
mosques moscar ver
mosqueta mosquete nom
mosquetas mosquete nom
mãozita mão nom
média médio adj
médias médio adj
-médica médico adj
-médicas médico adj
+médica médico nom
+médicas médico nom
médici médici nom
-médico médico adj
-médicos médico adj
+médico médico nom
+médicos médico nom
médio médio adj
médios médio adj
médium médium nom
neblina neblina nom
neblinas neblina nom
nebraska nebraska nom
+nebulizador nebulizador nom
+nebulizadores nebulizador nom
nebulizar nebulizar ver
nebulosa nebuloso nom
nebulosas nebuloso adj
normativas normativo adj
normativo normativo adj
normativos normativo adj
+normatiza normatizar ver
+normatizar normatizar ver
+normatizou normatizar ver
norminha norma nom
noroesta noroestar ver
noroeste noroeste nom
ociosidade ociosidade nom
ocioso ocioso adj
ociosos ocioso adj
+ocitocina ocitocina nom
oclui ocluir ver
ocluindo ocluir ver
ocluir ocluir ver
pacheco pacheco nom
pachola pachola nom
pachorra pachorra nom
-paciente paciente adj
+paciente paciente nom
pacientemente pacientemente adv
-pacientes paciente adj
+pacientes paciente nom
pacifica pacificar ver
pacificada pacificado adj
pacificadas pacificar ver
paleólogo paleólogo adj
paleólogos paleólogo nom
palha palha nom
+palhada palhada nom
palhares palhares nom
palhas palha nom
palhaça palhaço nom
paraplegia paraplegia nom
paraplegias paraplegia nom
paraplégica paraplégico adj
+paraplégicas paraplégico nom
paraplégico paraplégico adj
paraplégicos paraplégico nom
parapsicologia parapsicologia nom
plastificada plastificado adj
plastificado plastificado adj
plastificados plastificado adj
+plastificando plastificar ver
plastificante plastificante adj
plastificantes plastificante adj
plastídio plastídio nom
prejudicarem prejudicar ver
prejudicaria prejudicar ver
prejudicariam prejudicar ver
+prejudicarmos prejudicar ver
prejudicará prejudicar ver
prejudicarão prejudicar ver
prejudicaríamos prejudicar ver
pretendes pretender ver
pretendesse pretender ver
pretendessem pretender ver
+pretendestes pretender ver
pretendeu pretender ver
pretendi pretender ver
pretendia pretender ver
prioritárias prioritário adj
prioritário prioritário adj
prioritários prioritário adj
+priorizamos priorizar ver
+priorizando priorizar ver
+priorizar priorizar ver
+priorizaram priorizar ver
+priorizarei priorizar ver
+priorizaremos priorizar ver
+priorizarão priorizar ver
priorização priorização nom
priorizações priorização nom
+priorizei priorizar ver
prisca priscar ver
priscas priscar ver
priscila priscila nom
punhalada punhalada nom
punhaladas punhalada nom
punham pôr ver
+punheta punheta nom
+punhetas punheta nom
punho punho nom
punhos punho nom
puni punir ver
ralei ralar ver
rales ralar ver
ralha ralhar ver
+ralham ralhar ver
ralhar ralhar ver
ralharem ralhar ver
ralhava ralhar ver
ranking ranking nom
ranunculáceas ranunculáceo nom
ranzinza ranzinza adj
+ranzinzas ranzinza adj
ranário ranário nom
rança ranço adj
ranço ranço nom
rastrear rastrear ver
rastrearam rastrear ver
rastrearem rastrear ver
+rastrearmos rastrear ver
rastreavam rastrear ver
rastreia rastrear ver
rastreiam rastrear ver
revalorizar revalorizar ver
revalorizaram revalorizar ver
revalorização revalorização nom
+revalorizei revalorizar ver
revalorizou revalorizar ver
revanche revanche nom
revanches revanche nom
saidinha saída nom
saidinho saído adj
saido sair ver
+saimos sair ver
saindo sair ver
sainete sainete nom
sainha saia nom
serosas seroso adj
seroso seroso adj
serosos seroso adj
+serotonina serotonina nom
serpa serpa nom
serpe serpe nom
serpenta serpentar ver
sobredito sobredito adj
sobreditos sobredito adj
sobreelevada sobreelevar ver
+sobrei sobrar ver
sobreira sobreiro nom
sobreirais sobreiral nom
sobreiral sobreiral nom
supersônicas supersônico adj
supersônico supersônico adj
supersônicos supersônico adj
+supervalorizam supervalorizar ver
+supervalorizamos supervalorizar ver
+supervalorizando supervalorizar ver
+supervalorizar supervalorizar ver
+supervalorizaram supervalorizar ver
supervalorização supervalorização nom
+supervalorizei supervalorizar ver
+supervalorizo supervalorizar ver
superveniente superveniente adj
supervenientes superveniente adj
superveniência superveniência nom
suspeitados suspeitar ver
suspeitam suspeitar ver
suspeitamente suspeitamente adv
+suspeitamos suspeitar ver
suspeitando suspeitar ver
suspeitar suspeitar ver
suspeitara suspeitar ver
sítios sítio nom
sòmente somente adv
sòzinho sozinho adj
-só só adv
+só só adj
sóbria sóbrio adj
sóbrias sóbrio adj
sóbrio sóbrio adj
trabalharei trabalhar ver
trabalharem trabalhar ver
trabalharemos trabalhar ver
+trabalhares trabalhar ver
trabalharia trabalhar ver
trabalhariam trabalhar ver
trabalharmos trabalhar ver
transalpinos transalpino adj
transam transar ver
transamazônica transamazônico adj
+transamos transar ver
transamérica transamérica nom
transandina transandino adj
transandino transandino adj
transar transar ver
transaram transar ver
transarem transar ver
+transaria transar ver
transas transa nom
transatlântica transatlântico adj
transatlânticas transatlântico adj
transatlântico transatlântico adj
transatlânticos transatlântico adj
+transava transar ver
transação transação nom
transações transação nom
transborda transbordar ver
transgride transgredir ver
transgridem transgredir ver
transgénico transgénico adj
+transgênica transgênico nom
+transgênicas transgênico nom
+transgênico transgênico nom
+transgênicos transgênico nom
transi transir ver
transia transir ver
transiberiano transiberiano nom
tão tão adv
técnica técnica nom
técnicas técnica nom
-técnico técnico adj
-técnicos técnico adj
+técnico técnico nom
+técnicos técnico nom
tédio tédio nom
tédios tédio nom
tégmina tégmina nom
ultrapassáveis ultrapassável adj
ultrapassável ultrapassável adj
ultras ultra nom
+ultrasonografia ultrasonografia nom
ultravioleta ultravioleta adj
ultravioletas ultravioleta adj
ulula ulular ver
vacatura vacatura nom
vacaturas vacatura nom
vacila vacilar ver
+vacilada vacilada nom
vacilado vacilar ver
vacilam vacilar ver
vacilamos vacilar ver
valorização valorização nom
valorizações valorização nom
valorize valorizar ver
+valorizei valorizar ver
valorizem valorizar ver
valorizo valorizar ver
valorizou valorizar ver
verbalizadas verbalizar ver
verbalizado verbalizar ver
verbalizados verbalizar ver
+verbalizam verbalizar ver
verbalizando verbalizar ver
verbalizar verbalizar ver
verbalização verbalização nom
vívidas vívido adj
vívido vívido adj
vívidos vívido adj
+vó avô nom
vómito vómito nom
vómitos vómito nom
vórtice vórtice nom
vórtices vórtice nom
vós vós pro_per
+vô avô nom
vôlei vôlei nom
vômer vômer nom
vômito vômito nom
zoara zoar ver
zoaram zoar ver
zoava zoar ver
+zoação zoação nom
zodiacais zodiacal adj
zodiacal zodiacal adj
zodíaco zodíaco nom
'EmptyText' : u"Texte vide (probablement un problème de formatage du corpus). Le problème est apparu à la ligne ",
'CorpusEncoding' : u"Problème d'encodage.",
'TextBeforeTextMark' : u"Problème de formatage : du texte avant le premier marqueur de texte (****). Le problème est survenu à la ligne ",
+ 'MissingAnalyse' : u'Aucun fichier à cet emplacement :\n',
}
def BugReport(parent, error = None):
txt += u'*************************************\n'
txt += '\n'.join(excTb).replace(' ', ' ')
txt += excName + '\n'
- txt += exc
+ txt += `exc`
title = "Bug"
dial = BugDialog(parent, **{'title' : title})
else :
parent.lexique = ReadDicoAsDico(filein)
else :
- parent.lexique = {}
+ if filein is None :
+ parent.lexique = {}
+ else :
+ parent.lexique = ReadDicoAsDico(filein)
def ReadList(filein, encoding = sys.getdefaultencoding(), sep = ';'):
#file = open(filein)
height="400"
id="svg2"
version="1.1"
- inkscape:version="0.48.4 r9939"
+ inkscape:version="0.48.5 r10040"
sodipodi:docname="splash.svg"
inkscape:export-filename="/home/pierre/workspace/iramuteq/images/splash.png"
inkscape:export-xdpi="100"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="240.01838"
- inkscape:cy="170.0922"
+ inkscape:zoom="2.8"
+ inkscape:cx="299.60036"
+ inkscape:cy="128.09472"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1631"
- inkscape:window-height="1026"
- inkscape:window-x="49"
- inkscape:window-y="24"
+ inkscape:window-width="2878"
+ inkscape:window-height="1778"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
height="16.162449"
x="109.09647"
y="248.47711"
- style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#1d0e0e;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill-opacity:1" /></flowRegion><flowPara
- id="flowPara3039">(c) 2008-2013 Pierre Ratinaud</flowPara></flowRoot> <flowRoot
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#1d0e0e;fill-opacity:1;font-family:FreeSans;-inkscape-font-specification:FreeSans" /></flowRegion><flowPara
+ id="flowPara3039">(c) 2008-2014 Pierre Ratinaud</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot3041"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#1a1b20;fill-opacity:1;stroke:none;font-family:FreeSans;-inkscape-font-specification:FreeSans"
inkscape:export-ydpi="100"><flowRegion
id="flowRegion3862"><rect
id="rect3864"
- width="136.37061"
- height="19.192894"
+ width="141.72775"
+ height="18.478601"
x="110.10663"
y="146.45171"
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#1c1010;fill-opacity:1;font-family:gargi;-inkscape-font-specification:gargi Medium" /></flowRegion><flowPara
- id="flowPara3866">Version 0.6 alpha 4</flowPara></flowRoot> <flowRoot
+ id="flowPara3866">Version 0.6 alpha 10</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot3868"
- style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
+ style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"
+ inkscape:export-filename="/home/pierre/workspace/iramuteq/images/splash.png"
+ inkscape:export-xdpi="100"
+ inkscape:export-ydpi="100"><flowRegion
id="flowRegion3870"><rect
id="rect3872"
width="600.03064"
from guifunct import *
from tableau import Tableau
from dialog import PrefDialog, CorpusPref
-from tabfrequence import Frequences
+from tabfrequence import Frequences, FreqMultiple
from tabchi2 import ChiSquare
#from tabstudent import MakeStudent
from tabchddist import ChdCluster
ID_SimiTxt = wx.NewId()
ID_proto = wx.NewId()
ID_ImportTXM = wx.NewId()
+ID_FreqMulti = wx.NewId()
##########################################################
#elements de configuration
##########################################################
DictConfigPath = ConstructGlobalPath(AppliPath)
ConfigGlob = ConfigParser()
ConfigGlob.read(DictConfigPath['global'])
+DefaultConf = ConfigParser()
+DefaultConf.read(DictConfigPath['preferences'])
#repertoire de l'utilisateur
if os.getenv('HOME') != None:
user_home = os.getenv('HOME')
ConfigPath = ConstructConfigPath(UserConfigPath)
langues = {'french' : wx.LANGUAGE_FRENCH,
- 'english' : wx.LANGUAGE_ENGLISH,}
+ 'english' : wx.LANGUAGE_ENGLISH,
+ 'portuguese' : wx.LANGUAGE_PORTUGUESE,
+ 'italian' : wx.LANGUAGE_ITALIAN,
+ 'spanish' : wx.LANGUAGE_SPANISH}
+
+code_langues = {'french' : 'fr_FR',
+ 'english' : 'en',
+ 'portuguese' : 'pt_PT',
+ 'italian' : 'it_IT',
+ 'spanish' : 'es_ES'
+ }
#####################################################################
class IraFrame(wx.Frame):
#langues = ['fr_FR', 'en', 'pt_PT']
#for l in langues :
# pass
- self.presLan_fr = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['fr_FR'])
- self.presLan_en = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['en'])
+ self.preslangue = {}
+ for langue in code_langues :
+ self.preslangue[langue] = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=[code_langues[langue]])
self.setlangue()
+ #self.presLan_fr = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['fr_FR'])
+ #self.presLan_en = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['en'])
# tell FrameManager to manage this frame
#self._mgr = wx.aui.AuiManager()
self._mgr = aui.AuiManager()
#view_menu.AppendSeparator()
matrix_menu = wx.Menu()
matrix_menu.Append(ID_Freq, _(u"Frequencies").decode('utf8'))
+ matrix_menu.Append(ID_FreqMulti, _(u'Multiple frequencies').decode('utf8'))
matrix_menu.Append(ID_Chi2, _(u"Chi2").decode('utf8'))
#matrix_menu.Append(ID_Student, u"t de Student")
menu_classif = wx.Menu()
self.Bind(wx.EVT_MENU, self.ExtractTools, extractmod)
self.Bind(wx.EVT_MENU, self.ExtractTools, extractthem)
self.Bind(wx.EVT_MENU, self.OnFreq, id=ID_Freq)
+ self.Bind(wx.EVT_MENU, self.OnFreqMulti, id=ID_FreqMulti)
self.Bind(wx.EVT_MENU, self.OnChi2, id=ID_Chi2)
self.Bind(wx.EVT_MENU, self.OnStudent, id=ID_Student)
self.Bind(wx.EVT_MENU, self.OnCHDSIM, id=ID_CHDSIM)
##############################################################@
self.DisEnSaveTabAs(False)
- self.ShowMenu(_("View").decode('utf8'), False)
- self.ShowMenu(_("Matrix analysis").decode('utf8'), False)
- self.ShowMenu(_("Text analysis").decode('utf8'), False)
+ self.ShowMenu('view', False)
+ self.ShowMenu('matrix', False)
+ self.ShowMenu('text', False)
self._mgr.Update()
pass
dlg.Destroy()
-
def setlangue(self) :
+ self.pref.read(self.ConfigPath['preferences'])
try :
- self.pref.read(self.ConfigPath['preferences'])
guilangue = self.pref.get('iramuteq', 'guilanguage')
- if guilangue == 'french' :
- self.presLan_fr.install()
- elif guilangue == 'portuguese' :
- self.presLan_pt.install()
- else :
- self.presLan_en.install()
- mylocale = wx.Locale(langues[guilangue])
- mylocale.AddCatalogLookupPathPrefix(os.path.join(AppliPath,'locale'))
- mylocale.AddCatalog('iramuteq')
except :
- self.presLan_fr.install()
- mylocale = wx.Locale(langues['french'])
- mylocale.AddCatalogLookupPathPrefix(os.path.join(AppliPath,'locale'))
- mylocale.AddCatalog('iramuteq')
-
+ guilangue = DefaultConf.get('iramuteq', 'guilanguage')
+ self.preslangue.get(guilangue, 'english').install()
def OnVerif(self, evt) :
pack = CheckRPackages(self)
item.Enable(DISEN)
def ShowMenu(self, menu, Show=True):
- menu_pos = self.mb.FindMenu(menu)
- self.mb.EnableTop(menu_pos, Show)
- self.mb.UpdateMenus()
+ if menu == 'text' :
+ menu_pos = 4
+ elif menu == 'matrix' :
+ menu_pos = 3
+ elif menu == 'view' :
+ menu_pos = 2
+ else :
+ menu_pos = None
+
+ #menu_pos = self.mb.FindMenu(menu)
+ if not menu_pos is None :
+ self.mb.EnableTop(menu_pos, Show)
+ self.mb.UpdateMenus()
#--------------------------------------------------------------------
def OnOpenAnalyse(self, event):
self.AnalysePath = OnOpen(self, "Analyse")
OpenAnalyse(self, self.AnalysePath[1][0], True)
- self.ShowMenu(_("View"))
+ self.ShowMenu('view')
def OnOpenText(self, event):
inputname, self.input_path = OnOpen(self, "Texte")
self.OpenText()
def OnViewData(self, event):
- print self.type
- print self.DataTxt
if self.type == "Data":
if not self.DataPop :
self.Sheet.Populate(self.content)
self.tree.OnItemAppend(corpus.parametres)
OpenAnalyse(self, corpus.parametres)
except :
+ dlg.Destroy()
BugReport(self)
else :
count = 1
keepGoing = dlg.Update(count, u"Lecture du fichier")
- self.ShowMenu(_(u"View").decode('utf8'))
- self.ShowMenu(_(u"Text analysis").decode('utf8'))
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), False)
+ self.ShowMenu('view')
+ self.ShowMenu('text')
+ self.ShowMenu('matrix', False)
self.type = "Texte"
self.DataTxt = False
self.Text = ''
if 'parametres' in dir(npage) :
self.tree.GiveFocus(uuid=npage.parametres['uuid'])
if npage.parametres.get('matrix', False) :
- self.ShowMenu(_(u"Text analysis").decode('utf8'), False)
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), True)
+ self.ShowMenu('text', False)
+ self.ShowMenu('matrix', True)
elif npage.parametres.get('corpus', False) :
- self.ShowMenu(_(u"Text analysis").decode('utf8'))
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), False)
+ self.ShowMenu('text')
+ self.ShowMenu('matrix', False)
def OnCloseTab(self, evt):
#log.info('Closing tab %s' % str(evt.GetEventObject()))
self.history.rmtab(page.parametres)
self.tree.CloseItem(uuid = page.parametres['uuid'])
TabTitle = self.nb.GetPageText(self.nb.GetSelection())
-# if self.DictTab != {} :
-# if TabTitle in self.DictTab :
-# ListFile=self.DictTab[TabTitle]
-# if False in ListFile:
-# msg = u"""
-# Certains résultats ne sont pas enregistrer.
-# Voulez-vous fermer quand même ?"""
-# dlg = wx.MessageDialog(self, msg, "Sauvegarde",wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
-#
-# dlg.CenterOnParent()
-# if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
-# remove = False
-# evt.Veto()
-# dlg.Destroy()
-# else :
-# for f in ListFile[1:] :
-# print 'remove', f
-# os.remove(f)
-# remove = True
-# dlg.Destroy()
-# elif True in ListFile :
-# remove = True
-# if remove:
-# del self.DictTab[TabTitle]
-# else :
-# self.LastTabClose()
-# else :
-# remove = True
+
if self.nb.GetPageCount() == 1 and not notebook :
self.LastTabClose()
else :
self.ShowAPane("Intro_Text")
-# def OnSaveTabAs(self, event):
-# SelectTab = self.nb.GetSelection()
-# TabTitle = self.nb.GetPageText(SelectTab)
-# FileToSave = self.DictTab[TabTitle]
-# NewListFile = []
-# dlg = wx.FileDialog(
-# self, message="Enregistrer sous...", defaultDir=os.getcwd(),
-# defaultFile="resultat.html", wildcard="Tous les fichiers|*", style=wx.SAVE | wx.OVERWRITE_PROMPT
-# )
-# dlg.SetFilterIndex(2)
-# dlg.CenterOnParent()
-#
-# if dlg.ShowModal() == wx.ID_OK:
-# Path = dlg.GetPath()
-# Dirname = os.path.dirname(Path)
-# Filename = dlg.GetFilename()
-# else :
-# Path = False
-# dlg.Destroy()
-# if Path:
-# shutil.copyfile(FileToSave[-1], Path)
-# os.remove(FileToSave[len(FileToSave) - 1])
-# NewListFile.append(True)
-# NewListFile.append(Path)
-# for f in FileToSave[1:-1] :
-# Fileout = os.path.join(Dirname, os.path.basename(f))
-# shutil.copyfile(f, Fileout)
-# NewListFile.append(Fileout)
-# os.remove(f)
-# TabText = Filename
-# self.DictTab[TabText] = NewListFile
-# del self.DictTab[TabTitle]
-# self.nb.SetPageText(SelectTab, TabText)
-
def GetStartPosition(self):
self.x = self.x + 20
################################################################
#debut des analyses
################################################################
- def analyse_matrix(self, analyse, analyse_type = '', matrix = None, dlgnb = 1):
+ def analyse_matrix(self, analyse, analyse_type = '', matrix = None, parametres = None, dlgnb = 1):
if matrix is None :
matrix = self.tree.getmatrix()
+ if parametres is not None :
+ parametres['type'] = analyse_type
+ else :
+ parametres = {'type' : analyse_type}
try :
- analyse(self, matrix, parametres = {'type' : analyse_type}, dlg = dlgnb)
+ #print 'plus de bug@@@@@@@@@@@@@@@@@@@@@@'
+ analyse(self, matrix, parametres = parametres, dlg = dlgnb)
except:
BugReport(self)
def OnFreq(self, event, matrix = None):
self.analyse_matrix(Frequences, analyse_type = 'freq', matrix = matrix, dlgnb = 3)
+
+ def OnFreqMulti(self, event, matrix = None):
+ self.analyse_matrix(FreqMultiple, analyse_type = 'freqmulti', matrix = matrix, dlgnb = 3)
def OnChi2(self, event, matrix = None):
self.analyse_matrix(ChiSquare, matrix = matrix, analyse_type = 'chi2', dlgnb = 3)
#Prototypical(self, {'type' : 'proto'})
def OnSplitVar(self, evt, matrix = None):
- self.analyse_matrix(SplitMatrixFromVar, matrix = matrix, analyse_type = 'splitvar', dlgnb = 3)
+ self.analyse_matrix(SplitMatrixFromVar, matrix = matrix, analyse_type = 'splitvar', parametres = {'pathout': matrix.pathout.dirout}, dlgnb = 3)
matrix = self.tree.getmatrix()
ira.nb.AddPage(self.sheet, matrix.parametres['matrix_name'])
self.sheet.Populate(matrix.csvtable)
self.sheet.parametres = matrix.parametres
- #self.ira.ShowMenu(_(u"View").decode('utf8'))
- #self.ira.ShowMenu(_(u"Matrix analysis").decode('utf8'))
- #self.ira.ShowMenu(_(u"Text analysis").decode('utf8'), False)
- #self.parent.type = "Data"
- #self.parent.DataPop = False
ira.nb.SetSelection(ira.nb.GetPageCount() - 1)
ira.ShowAPane("Tab_content")
- #self.ira.OnViewData('')
-
-
-
class CopusPanel(wx.Panel) :
def __init__(self, parent, parametres) :
def doopen(self, corpus) :
if self.conf['type'] == 'corpus' :
- self.parent.ShowMenu(_("Text analysis"))
OpenCorpus(self.parent, self.conf)
elif self.conf['type'] == 'stat' :
- self.parent.ShowMenu(_("Text analysis"))
StatLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'spec' :
- self.parent.ShowMenu(_("Text analysis"))
dolexlayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'alceste' :
- self.parent.ShowMenu(_("Text analysis"))
OpenCHDS(self.parent, corpus, self.conf, Alceste = True)
elif self.conf['type'] == 'simitxt' or self.conf['type'] == 'clustersimitxt' :
- self.parent.ShowMenu(_("Text analysis"))
SimiLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'wordcloud' or self.conf['type'] == 'clustercloud':
- self.parent.ShowMenu(_("Text analysis"))
WordCloudLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'reinertmatrix' :
- #self.parent.ShowMenu(_("Spreadsheet analysis"))
OpenCHDS(self.parent, corpus, self.conf, Alceste = False)
elif self.conf['type'] == 'simimatrix' :
- #self.parent.ShowMenu(_("Spreadsheet analysis"))
SimiMatLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'proto' :
ProtoLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'matrix' :
MatLayout(self.parent, corpus)
- elif self.conf['type'] == 'freq' :
+ elif self.conf['type'] == 'freq' or self.conf['type'] == 'freqmulti':
FreqLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'chi2' :
Chi2Layout(self.parent, corpus, self.conf)
from analysematrix import AnalyseMatrix
from functions import exec_rcode, check_Rresult
from dialog import FreqDialog
-from PrintRScript import PrintRScript
+from PrintRScript import PrintRScript, FreqMultiScript
+from operator import itemgetter
class Frequences(AnalyseMatrix) :
def doparametres(self, dlg=None) :
with open(fileout, 'w') as f :
f.write(pretexte + texte)
#return fileout
+
+class FreqMultiple(Frequences):
+ def doanalyse(self):
+ select = self.parametres['colsel']
+ freq = self.tableau.countmultiple(select)
+ tot = sum([freq[forme][0] for forme in freq])
+ freq = [[forme, freq[forme][0], `round((float(freq[forme][0])/tot)*100, 2)`,`len(list(set(freq[forme][1])))`, `round((float(len(list(set(freq[forme][1]))))/self.tableau.rownb)*100,2)`] for forme in freq]
+ freq = sorted(freq, key=itemgetter(1), reverse=True)
+ freq = [[line[0], `line[1]`, line[2], line[3], line[4]] for line in freq]
+ freq.insert(0, [u'mod', 'freq', 'percent of total', 'row number', 'percent of rows'])
+ self.freq = freq
+ with open(self.pathout['frequences.csv'], 'w') as f :
+ f.write('\n'.join(['\t'.join(line) for line in freq]))
+ self.rscript = FreqMultiScript(self)
+ self.rscript.make_script()
+ self.doR(self.rscript.scriptout)
+ self.dolayout()
+
+ def dolayout(self):
+ pretexte = u'''<html>
+ <meta http-equiv="content-Type" content="text/html; charset=%s" />
+ <body>\n<h1>Fréquences</h1>
+ <a name="deb"></a><br>
+ ''' % self.parent.SysEncoding
+ txt = """
+ <table>\n<tr><td>\n
+ <table border=1><tr><td>
+ """
+ txt += '</td></tr><tr><td>'.join(['</td><td>'.join(line) for line in self.freq]) + '</td></tr></table></td></tr>'
+ txt += '<tr><td><img src="%s" alt="graph"/></td><td><img src="%s" alt="graph"/></td></tr></table>' % (os.path.basename(self.pathout['barplotfreq.png']), os.path.basename(self.pathout['barplotrow.png']))
+ txt += "</body>\n</html>"
+ with open(self.pathout['resultats.html'], 'w') as f :
+ f.write(pretexte + txt)
+
+
+
+
+
+
+
\ No newline at end of file
import xlrd
import ooolib
import os
-import tempfile
+from copy import copy
import re
import htmlentitydefs
import shelve
def copymatrix(tableau):
log.info('copy matrix')
copymat = Tableau(tableau.parent, parametres = tableau.parametres)
- copymat.linecontent = tableau.linecontent
- copymat.csvtable = tableau.csvtable
- copymat.pathout = tableau.pathout
- copymat.colnames = tableau.colnames
- copymat.rownb = tableau.rownb
- copymat.colnb = tableau.colnb
+ copymat.linecontent = copy(tableau.linecontent)
+ copymat.csvtable = copy(tableau.csvtable)
+ copymat.pathout = copy(tableau.pathout)
+ copymat.colnames = copy(tableau.colnames)
+ copymat.rownb = copy(tableau.rownb)
+ copymat.colnb = copy(tableau.colnb)
if copymat.csvtable is None :
copymat.open()
return copymat
self.read_ods()
self.parametres['csvfile'] = os.path.join(self.parametres['pathout'], 'csvfile.csv')
self.make_tmpfile()
+ print self.parametres
DoConf().makeoptions(['matrix'],[self.parametres], self.parametres['ira'])
self.parent.history.addMatrix(self.parametres)
+
+ def make_content_simple(self):
+ self.parametres['csvfile'] = os.path.join(self.parametres['pathout'], 'csvfile.csv')
+ self.make_tmpfile()
+ DoConf().makeoptions(['matrix'],[self.parametres], self.parametres['ira'])
+ self.parent.history.addMatrix(self.parametres)
def read_xls(self) :
#FIXME : encodage
from functions import exec_rcode, check_Rresult
from dialog import FreqDialog
from PrintRScript import PrintRScript
+from tableau import Tableau
class SplitMatrixFromVar(AnalyseMatrix):
def doparametres(self, dlg=None) :
if val == wx.ID_OK :
self.parametres['colsel'] = dial.m_listBox1.GetSelections()
self.parametres['header'] = dial.header
+ self.parametres['tohistory'] = False
else :
self.parametres = None
dial.Destroy()
def doanalyse(self):
newtabs = self.tableau.splitfromvar(self.parametres['colsel'][0])
for mod in newtabs :
- fout = self.tableau.pathout['%s.csv' % mod].replace(u'*','')
- with open(fout, 'w') as f :
- f.write('\n'.join(['\t'.join(line) for line in newtabs[mod]]).encode(self.parent.syscoding))
- print 'done!'
\ No newline at end of file
+ tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace(u'*',''))
+ if not os.path.exists(tab.pathout.dirout) :
+ os.mkdir(tab.pathout.dirout)
+ tab.linecontent = newtabs[mod]
+ tab.make_content_simple()
+ tab.parametres['matrix'] = tab.parametres['uuid']
+ self.ira.tree.OnItemAppend(tab.parametres, select = False)
\ No newline at end of file
self.corpus.make_and_write_sparse_matrix_from_uci(self.actives, self.pathout['TableUc1'], self.pathout['listeuce1'])
uci = True
Rscript = self.printRscript()
- self.doR(Rscript, dlg=self.dlg, message='CHD...')
-
+ result = self.doR(Rscript, dlg=self.dlg, message='CHD...')
+ if not result :
+ return 'NOK'
self.corpus.make_ucecl_from_R(self.pathout['uce'])
self.corpus.make_and_write_profile(self.actives, self.corpus.lc, self.pathout['Contout'], uci = uci)
self.sup, lim = self.corpus.make_actives_nb(self.parametres['max_actives'], 2)
from openanalyse import OpenAnalyse
from corpus import Corpus, copycorpus
from tableau import Tableau, copymatrix
-from functions import DoConf, GetTxtProfile, TGen
+from functions import DoConf, GetTxtProfile, TGen, BugReport
from profile_segment import ProfileSegment, ProfilType
from search_tools import SearchFrame
from dialog import PrefSimpleFile, PrefExport
elif data.startswith("EVT_"):
events.append(data)
self.parent = parent
+ self.ira = parent
self.events = events
self.styles = treestyles
self.item = None
imgmatroot = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'matroot.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
self.ild['matrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'matrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
self.ild['freq'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'frequences.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
+ self.ild['freqmulti'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'frequences.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
self.ild['chi2'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'chi2.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
self.ild['reinertmatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'reinertmatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
self.ild['simimatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'simimatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
if not item in [self.textroot, self.matroot] :
menu = wx.Menu()
- info = menu.Append(wx.ID_ANY, _(u"Informations").encode('utf8'))
- rename = menu.Append(wx.ID_ANY, _(u"Rename").encode('utf8'))
+ info = menu.Append(wx.ID_ANY, _(u"Informations").decode('utf8'))
+ rename = menu.Append(wx.ID_ANY, _(u"Rename").decode('utf8'))
menu.AppendSeparator()
if 'corpus_name' in pydata :
self.SetItemBold(item, bold)
self.SelectItem(item)
- def OnItemAppend(self, item):
+ def OnItemAppend(self, item, select = True):
if 'corpus_name' in item :
child = self.InsertItem(self.textroot, 0, item['corpus_name'])
else :
child = self.InsertItem(self.matroot, 0, item['matrix_name'])
self.SetPyData(child, item)
- self.history.addtab(item)
if item['type'] in self.ild :
img = self.ild[item['type']]
else :
img = 24
self.SetItemImage(child, img, CT.TreeItemIcon_Normal)
self.SetItemImage(child, img, CT.TreeItemIcon_Expanded)
- self.SetItemBold(child, True)
+ if select :
+ self.history.addtab(item)
+ self.SetItemBold(child, True)
#dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python')
elif pydata['uuid'] in ['textroot', 'matroot'] :
pass
else :
- busy = wx.BusyInfo(_("Please wait..."), self.parent)
- wx.SafeYield()
- OpenAnalyse(self.parent, pydata)
- del busy
- self.SetItemBold(item, True)
- self.OnSelChanged(pydata = pydata)
+ if os.path.exists(pydata['ira']) :
+ busy = wx.BusyInfo(_("Please wait..."), self.parent)
+ wx.SafeYield()
+ try :
+ OpenAnalyse(self.parent, pydata)
+ del busy
+ self.SetItemBold(item, True)
+ self.OnSelChanged(pydata = pydata)
+ except :
+ del busy
+ BugReport(self.ira)
+ else :
+ wx.MessageBox(_(u"This file does not exist : %s" % pydata['ira']).decode('utf8'), 'Information', wx.ICON_EXCLAMATION | wx.STAY_ON_TOP )
#if item and (flags & CT.TREE_HITTEST_ONITEMLABEL):
# if self.GetAGWWindowStyleFlag() & CT.TR_EDIT_LABELS:
# self.log.info("OnLeftDClick: %s (manually starting label edit)"% self.GetItemText(item) + "\n")
if event is not None :
item = event.GetItem()
pydata = self.GetPyData(item)
+
if pydata is not None :
+ if 'corpus_name' in pydata or 'corpus' in pydata :
+ self.ira.ShowMenu('text', True)
+ self.ira.ShowMenu('matrix', False)
+ if 'matrix_name' in pydata or 'matrix' in pydata:
+ self.ira.ShowMenu('text', False)
+ self.ira.ShowMenu('matrix', True)
self.pydata = pydata
if pydata['uuid'] in self.parent.history.opened :
for i in range(self.parent.nb.GetPageCount()) :