X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=OptionAlceste.py;h=2de8a7856017ba014d5a16781b1c1e744d54c0e7;hp=49ff0f13d22f72e15e6e84347973b88da7589861;hb=5d84083b41b807307732adb78e1be7fd3e3ff004;hpb=7fb5b2b86f6c9a0617208ee85211177c23d12f47 diff --git a/OptionAlceste.py b/OptionAlceste.py index 49ff0f1..2de8a78 100755 --- a/OptionAlceste.py +++ b/OptionAlceste.py @@ -20,28 +20,34 @@ class OptionAlc(wx.Dialog): self.DictPath = parametres['pathout'] self.AlcesteConf = parametres self.choose = False - + self.svdmethod = ['svdR', 'irlba'] + if self.parent.pref.getboolean('iramuteq','libsvdc') : + self.svdmethod.append('svdlibc') #self.label_1 = wx.StaticText(self, -1, u"Lemmatisation") #self.radio_1 = wx.RadioBox(self, -1, u"", choices=['oui', 'non'], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.label_12 = wx.StaticText(self, -1, u"Classification") - self.radio_box_2 = wx.RadioBox(self, -1, u"", choices=[u"double sur UC", u"simple sur UCE", u"simple sur UCI"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) #, u"simple sur UCE (non implemente)" - self.label_2 = wx.StaticText(self, -1, u"taille uc 1") - self.spin_ctrl_1 = wx.SpinCtrl(self, -1, "formes actives",size = (100,30), min=0, max=100) - self.label_3 = wx.StaticText(self, -1, u"taille uc 2") - self.spin_ctrl_2 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=100) + self.radio_box_2 = wx.RadioBox(self, -1, u"", choices=[u"double sur RST", u"simple sur segments de texte", u"simple sur textes"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) #, u"simple sur UCE (non implemente)" + self.label_2 = wx.StaticText(self, -1, u"taille rst 1") + self.spin_ctrl_1 = wx.SpinCtrl(self, -1, "formes actives",size = (100,30), min=0, max=1000000) + self.label_3 = wx.StaticText(self, -1, u"taille rst 2") + self.spin_ctrl_2 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000000) self.lab_nbcl = wx.StaticText(self, -1, u"nombre de classes terminales de la phase 1") - self.spin_nbcl = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=100) - txt = """Nombre minimum d'uce par classe + self.spin_nbcl = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=1000000) + txt = """Nombre minimum de segments de texte par classe (0 = automatique)""" self.label_7 = wx.StaticText(self, -1, txt) - self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000) + self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000000) txt = u"""Fréquence minimum d'une forme analysée (2 = automatique)""" self.label_8 = wx.StaticText(self, -1, txt) - self.spin_ctrl_5 = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=1000) + self.spin_ctrl_5 = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=1000000) self.label_max_actives = wx.StaticText(self, -1, u"Nombre maximum de formes analysées") - self.spin_max_actives = wx.SpinCtrl(self, -1, "",size = (100,30), min=20, max=10000) + self.spin_max_actives = wx.SpinCtrl(self, -1, "",size = (100,30), min=20, max=1000000) + self.label_svd = wx.StaticText(self, -1, u"Méthode pour svd") + self.choicesvd = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.svdmethod, 0 ) + self.label_patate = wx.StaticText(self, -1, u"Mode patate (+ rapide, - précis)") + self.check_patate = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) #self.label_4 = wx.StaticText(self, -1, u"Configuration \ndes clés d'analyse") #self.button_5 = wx.Button(self, wx.ID_PREFERENCES, "") self.button_1 = wx.Button(self, wx.ID_CANCEL, "") @@ -72,6 +78,15 @@ analysée (2 = automatique)""" self.spin_ctrl_5.Disable() self.spin_max_actives.SetValue(int(self.parametres['max_actives'])) self.spin_nbcl.SetValue(int(self.parametres['nbcl_p1'])) + if 'svdmethod' in self.parametres : + self.choicesvd.SetSelection(self.svdmethod.index(self.parametres['svdmethod'])) + else : + self.choicesvd.SetSelection(1) + if 'mode.patate' in self.parametres : + self.check_patate.SetValue(self.parametres['mode.patate']) + else : + self.check_patate.SetValue(False) + def __do_layout(self): sizer_1 = wx.BoxSizer(wx.VERTICAL) @@ -122,10 +137,15 @@ analysée (2 = automatique)""" grid_sizer2.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.ALL, 1) grid_sizer2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.ALL, 1) - #grid_sizer2.Add(self.label_4, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) - #grid_sizer2.Add(self.button_5, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) - #grid_sizer2.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.ALL, 1) - #grid_sizer2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.ALL, 1) + grid_sizer2.Add(self.label_svd, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) + grid_sizer2.Add(self.choicesvd, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) + grid_sizer2.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.ALL, 1) + grid_sizer2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.ALL, 1) + + grid_sizer2.Add(self.label_patate, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) + grid_sizer2.Add(self.check_patate, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 0) + grid_sizer2.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.ALL, 1) + grid_sizer2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.ALL, 1) grid_button.Add(self.button_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_button.Add(self.button_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)