...
[iramuteq] / dialog.py
index 43aa2c2..314700d 100755 (executable)
--- a/dialog.py
+++ b/dialog.py
@@ -1205,18 +1205,19 @@ class LexDialog( wx.Dialog ):
 class PrefUCECarac(wx.Dialog):
     def __init__(self, parent, *args, **kwds):
         kwds['style'] = wx.DEFAULT_DIALOG_STYLE 
-        kwds['title'] = u"UCE caractéristiques"
+        kwds['title'] = u"Segments de texte caractéristiques"
         wx.Dialog.__init__(self, *args, **kwds)
         self.parent = parent
         first = wx.BoxSizer(wx.VERTICAL)
         sizer = wx.FlexGridSizer(0,2,0,0)
         self.label_type = wx.StaticText(self, -1, u"Score de classement")
         sizer.Add(self.label_type, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
-        self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées de l\'UCE)', u'relatif (moyenne des chi2 des formes marquées de l\'UCE)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
+        self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées du segment)', u'relatif (moyenne des chi2 des formes marquées du segment)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
         sizer.Add(self.radio_type, 0, wx.ALIGN_RIGHT, 5)
-        self.txt_eff = wx.StaticText(self, -1, u"Nombre d\'UCE maximum")
+        self.txt_eff = wx.StaticText(self, -1, u"Nombre maximum de segments de texte")
         sizer.Add(self.txt_eff, 0, wx.ALIGN_CENTRE, 5)
         self.spin_eff = wx.SpinCtrl(self, -1, '', size = (100, 30), min = 1, max = 100000, initial = 50)
+        self.spin_eff.SetValue(50)
         sizer.Add(self.spin_eff, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
         first.Add(sizer, 0, wx.ALL, 5)
         btnsizer = wx.StdDialogButtonSizer()
@@ -1467,7 +1468,7 @@ class FindInCluster(wx.Frame):
         # begin wxGlade: MyFrame.__init__
         wx.Frame.__init__(self, parent, id)
         self.spanel =  wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
-        self.sizer1 = wx.FlexGridSizer(len(result)+1,4,0,0)
+        self.sizer1 = wx.FlexGridSizer(0,4,0,0)
         self.parent = parent
         self.formes = {}
         txt =  [u'forme',u'classe',u'chi2',u'voir']
@@ -1553,10 +1554,10 @@ class FindInCluster(wx.Frame):
     def OnCloseWindow(self, evt):
         self.Destroy()
 
-class SearchDial ( wx.Dialog ):
+class SearchDial ( wx.Frame ):
     
     def __init__( self, parent, listctrl, col, shown):
-        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+        wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE )
         self.parent = parent
         self.listctrl = listctrl
         self.col = col
@@ -1709,6 +1710,12 @@ class OptLexi(wx.Dialog):
         self.force_chi = force_chi
         #self.labellem =  wx.StaticText(self, -1, u"Lemmatisation : ")
         #self.checklem = wx.CheckBox(self, -1)
+        if not self.force_chi :
+            self.label_typeformes =  wx.StaticText(self, -1, u"Formes retenues")
+            typeformeschoiceChoices = [ u"actives et supplémentaires", u"actives", u"supplémentaires"]
+            self.typeformes = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, typeformeschoiceChoices, 0 )
+            self.typeformes.SetSelection( 0 )
+
         self.label_var =  wx.StaticText(self, -1, u"Sélection par :")
         self.choice = wx.Choice(self, -1, (100,50), choices = [u'variables', u'modalités'])
         self.label1 =  wx.StaticText(self, -1, u"Choix")
@@ -1746,6 +1753,9 @@ class OptLexi(wx.Dialog):
         sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
         #sizer_2.Add(self.labellem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
         #sizer_2.Add(self.checklem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
+        if not self.force_chi :
+            sizer_2.Add(self.label_typeformes, 0, wx.ALIGN_CENTER_VERTICAL, 3)
+            sizer_2.Add(self.typeformes, 0, wx.ALIGN_CENTER_VERTICAL, 3)
         sizer_2.Add(self.label_var, 0, wx.ALIGN_CENTER_VERTICAL, 3)
         sizer_2.Add(self.choice, 0, wx.ALIGN_CENTER_VERTICAL, 3)
         sizer_2.Add(self.label1, 0, wx.ALIGN_CENTER_VERTICAL, 3)
@@ -1906,7 +1916,7 @@ class PrefDendro ( wx.Dialog ):
 
 class PrefWordCloud ( wx.Dialog ):
     
-    def __init__( self, parent ):
+    def __init__( self, parent, fromcluster = False ):
         wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Préférences wordcloud", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
         
         self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
@@ -1966,7 +1976,17 @@ class PrefWordCloud ( wx.Dialog ):
         self.format = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, formatChoices, 0 )
         self.format.SetSelection( 0 )
         fgSizer1.Add( self.format, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+        if fromcluster :
+            self.m_staticText111 = wx.StaticText( self, wx.ID_ANY, u"Taille des mots en fonction de ...", wx.DefaultPosition, wx.DefaultSize, 0 )
+            self.m_staticText11.Wrap( -1 )
+            fgSizer1.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
+            IndiceChoices = [ u"chi2", u"fréquence" ]
+            self.indice = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, IndiceChoices, 0 )
+            self.indice.SetSelection( 0 )
+            fgSizer1.Add( self.indice, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
         self.m_staticline13 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
         fgSizer1.Add( self.m_staticline13, 0, wx.EXPAND |wx.ALL, 5 )
         
@@ -2221,8 +2241,8 @@ class CorpusPref ( wx.Dialog ):
     def __init__( self, parent, parametres ):
         wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Préférences", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
         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'greek (expériementale)', u'autre...']
-        self.langues = [u'french', u'english', u'german', 'italian', 'swedish', u'portuguese', 'greek', 'other']
+        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'autre...']
+        self.langues = [u'french', u'english', u'german', u'italian', u'swedish', u'portuguese', u'spanish', u'greek', u'other']
         self.encodages = [enc[0].lower() for enc in encodages]
 
         ucimark = [u'****', u'0000']
@@ -2282,7 +2302,7 @@ class CorpusPref ( wx.Dialog ):
         
         fgSizer1.Add( fgSizer41, 1, wx.EXPAND, 5 )        
 
-        self.m_staticText12 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Marqueur d'UCI", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText12 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Marqueur de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText12.Wrap( -1 )
         fgSizer1.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
         
@@ -2299,7 +2319,7 @@ class CorpusPref ( wx.Dialog ):
         self.check_expressions.SetValue(True) 
         fgSizer1.Add( self.check_expressions, 0, wx.ALL, 5 )
         
-        self.m_staticText9 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Construire des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText9 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Construire des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText9.Wrap( -1 )
         fgSizer1.Add( self.m_staticText9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
         
@@ -2307,7 +2327,7 @@ class CorpusPref ( wx.Dialog ):
         self.check_makeuce.SetValue(True) 
         fgSizer1.Add( self.check_makeuce, 0, wx.ALL, 5 )
         
-        self.m_staticText10 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Mode de construction des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText10 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Mode de construction des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText10.Wrap( -1 )
         fgSizer1.Add( self.m_staticText10, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
         
@@ -2316,7 +2336,7 @@ class CorpusPref ( wx.Dialog ):
         self.uce_mode.SetSelection( 0 )
         fgSizer1.Add( self.uce_mode, 0, wx.ALL, 5 )
         
-        self.m_staticText13 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Taille des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText13 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Taille des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText13.Wrap( -1 )
         fgSizer1.Add( self.m_staticText13, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )