X-Git-Url: http://www.iramuteq.org/git?a=blobdiff_plain;f=iramuteq.py;h=2bec72a81b59f747f7597bafa40ff3734c4cedc6;hb=14ef9adbd80ca7e8ed9ee3f108858fa7d7c24d5b;hp=2938c88a410f51fd203377421d484465ed392ef1;hpb=0df8fefc078c8e93342e6b7ad55a0ba0b9142498;p=iramuteq diff --git a/iramuteq.py b/iramuteq.py index 2938c88..2bec72a 100755 --- a/iramuteq.py +++ b/iramuteq.py @@ -56,6 +56,7 @@ from tabfrequence import Frequences, FreqMultiple from tableau import Tableau from tabrsimple import InputText from tabsimi import DoSimi +from tabcatego import Categorisation from tabsplitvar import SplitMatrixFromVar from tabverges import Prototypical from textaslexico import Lexico @@ -93,6 +94,7 @@ ID_CHECKCORPUS = wx.Window.NewControlId() ID_Tabcontent = wx.Window.NewControlId() ID_AFCM = wx.Window.NewControlId() ID_SIMI = wx.Window.NewControlId() +ID_CATE = wx.Window.NewControlId() ID_CloseTab = wx.Window.NewControlId() ID_SaveTab = wx.Window.NewControlId() ID_CreateText = wx.Window.NewControlId() @@ -217,7 +219,8 @@ images_analyses = { 'preferences' : 'preferences.png', 'exportmetatable' : 'exportmetatable.png', 'importdmi' : 'twitter.png', - 'labbe' : 'spec.png' + 'labbe' : 'spec.png', + 'categorisation' : 'spec.png', } @@ -236,6 +239,8 @@ class IraFrame(wx.Frame): log.info('Starting Iramuteq... ' ) log.info('version : %s' % ConfigGlob.get('DEFAULT', 'version')) wx.Frame.__init__(self, parent, id, title, pos, size, style) + #Font + self.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) # configuration self.AppliPath = AppliPath self.images_path = os.path.join(AppliPath,'images') @@ -351,6 +356,7 @@ class IraFrame(wx.Frame): [ID_SIMI, _("Similarities Analysis"), 'simimatrix'], [ID_proto, _("Prototypical Analysis"), 'proto'], [ID_Splitfromvar, _("Split from variable"), 'subcorpusmeta'], + [ID_CATE, _("ElCaTeGoRiZatoR"), 'categorisation'], ] for analyse in matanalyses : if not isinstance(analyse, dict) : @@ -488,10 +494,10 @@ class IraFrame(wx.Frame): #------------------------------------------------------------------------------------------------ # fichier d'historique de Iramuteq #------------------------------------------------------------------------------------------------ - #if not os.path.exists(os.path.join(UserConfigPath, 'history.db')) : - # with open(os.path.join(UserConfigPath, 'history.db'), 'w') as f : - # f.write('') - self.history = History(os.path.join(UserConfigPath, 'historyIramuteq')) + if not os.path.exists(os.path.join(UserConfigPath, 'history.db')) : + with open(os.path.join(UserConfigPath, 'history.db'), 'w') as f : + f.write('{}') + self.history = History(os.path.join(UserConfigPath, 'history.db')) # l'extension ".db" est ajoutée automatiquement par le module #------------------------------------------------------------------------------------------------ @@ -504,7 +510,7 @@ class IraFrame(wx.Frame): Name("lefttree"). Caption(_("Historic")). Left(). - MinSize(wx.Size(200,500)). + MinSize(wx.Size(300,400)). Layer(1). Position(1). CloseButton(False). @@ -602,6 +608,7 @@ class IraFrame(wx.Frame): self.Bind(wx.EVT_MENU, self.OnAFCM, id=ID_AFCM) self.Bind(wx.EVT_MENU, self.OnProto, id=ID_proto) self.Bind(wx.EVT_MENU, self.OnSplitVar, id = ID_Splitfromvar) + self.Bind(wx.EVT_MENU, self.OnCategorisation, id = ID_CATE) #self.Bind(wx.EVT_MENU, self.OnRCode, id=ID_RCODE) #??? #self.Bind(wx.EVT_MENU, self.OnSplitVar, id=ID_SPLITVAR) #??? #self.Bind(wx.EVT_MENU, self.OnCheckcorpus, id = ID_CHECKCORPUS) #??? @@ -1007,6 +1014,10 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" def OnSimiTab(self, event, matrix = None): self.analyse_matrix(DoSimi, matrix = matrix, analyse_type = 'simimatrix', dlgnb = 5) + def OnCategorisation(self, event, matrix = None) : + self.analyse_matrix(Categorisation, matrix = matrix, analyse_type = 'categorisation', dlgnb = 1) + + def OnCHDReinert(self, event, matrix = None): #if matrix is None : # matrix = self.tree.getmatrix()