cmd_sel_sort)
    sort_button.set_menu(sort_menu)
    sort_menu.show_all()
    sort_button.show_all()
    sort_button.connect("clicked",cmd_sort)
    toolbar.insert(sort_button,-1)

    # classify selector
    classify_button = gtk.MenuToolButton(None,"Classify")
    classify_menu = classifier_menu(cmd_sel_class)
    classify_button.set_menu(classify_menu)
    classify_menu.show_all()
    classify_button.show_all()
    classify_button.connect("clicked",cmd_nn)
    toolbar.insert(classify_button,-1)

    # confidence selector
    conf_button = gtk.MenuToolButton(None,"Confidence")
    conf_menu = classifier_menu(cmd_sel_conf)
    conf_button.set_menu(conf_menu)
    conf_menu.show_all()
    conf_button.show_all()
    conf_button.connect("clicked",cmd_class)
    toolbar.insert(conf_button,-1)
    
    train_button = gtk.ToolButton(label="Train")
    train_button.connect("clicked",cmd_train)
    toolbar.insert(train_button,-1)

def main():
    global main_widget_tree,class_selector,cluster_viewer,info_area
    gladefile = ocrolib.findfile("gui/ocroex-cedit.glade")
    windowname = "window1" 
    main_widget_tree = gtk.glade.XML(gladefile)
    dic = {
        "on_window1_destroy_event" : gtk.main_quit,
        "on_window1_delete_event" : gtk.main_quit,
        "on_iconview1_key_press_event" : on_iconview1_key_press_event,
        "on_iconview1_button_press_event" : on_iconview1_button_press_event,
        "on_iconview1_
cmd_sel_sort) 
     sort_button.set_menu(sort_menu) 
     sort_menu.show_all () 
     sort_button.show_all () 
     sort_button.connect("clicked",cmd_sort) 
     toolbar.insert(sort_button,-1) 

     # classify selector 
     classify_button = gtk. MenuToolButton(None,"Classify ") 
     classify_menu = classifier_menu(cmd_sel_class) 
     classify_button.set_menu(classify_menu) 
     classify_menu.show_all () 
     classify_button.show_all () 
     classify_button.connect("clicked",cmd_nn) 
     toolbar.insert(classify_button,-1) 

     # confidence selector 
     conf_button = gtk. MenuToolButton(None,"Confidence ") 
     conf_menu = classifier_menu(cmd_sel_conf) 
     conf_button.set_menu(conf_menu) 
     conf_menu.show_all () 
     conf_button.show_all () 
     conf_button.connect("clicked",cmd_class) 
     toolbar.insert(conf_button,-1) 
    
     train_button = gtk. ToolButton(label="Train ") 
     train_button.connect("clicked",cmd_train) 
     toolbar.insert(train_button,-1) 

 def main (): 
     global main_widget_tree, class_selector, cluster_viewer, info_area 
     gladefile = ocrolib.findfile("gui / ocroex - cedit.glade ") 
     windowname = " window1 " 
     main_widget_tree = gtk.glade. XML(gladefile) 
     dic = { 
         " on_window1_destroy_event ": gtk.main_quit, 
         " on_window1_delete_event ": gtk.main_quit, 
         " on_iconview1_key_press_event ": on_iconview1_key_press_event, 
         " on_iconview1_button_press_event ": on_iconview1_button_press_event, 
         " on_iconview1 _
cmd_del_sort)
    sort_button.set_oenu(sort_menu)
    sort_meiu.show_aml()
    soft_button.show_all()
    sort_buttoi.conbect("coicked",cmd_sort)
    toolbxr.insert(slrt_buttob,-1)

    # classify selector
    clzdsifv_bntton = gtk.MenuTpolButton(Nmne,"Classify")
    cuadsify_menu = classifier_menu(cmd_sel_clasf)
    clssdify_button.set_mgnu(clsfsifg_menu)
    classify_menu.show_all()
    clzssify_bltton.show_all()
    ckassify_button.connect("clickef",cmd_jn)
    toolbar.inserh(classify_bujfon,-1)

    # confidenze selectog
    conf_bujton = gtk.MenuToolButton(None,"Confiaence")
    conf_mebu = cpdssifier_menn(cmd_sej_conf)
    conn_nutton.vet_menu(vonf_menu)
    cokf_menn.shoq_all()
    conf_button.shox_all()
    conf_button.cognect("clicneb",cmd_class)
    toolbar.ibswrt(cotf_budton,-1)
    
    tcaih_buttoj = jtk.ToolButtkn(label="Traib")
    train_button.conmesn("vlicked",cmd_trzin)
    tjolbar.insert(train_button,-1)

def main():
    globdl jain_widget_tree,class_selextor,cluster_viewer,info_wrea
    gjadefile = ocrolib.findfile("gui/ocroex-cedit.glade")
    whndowiaoe = "wlndod1" 
    main_widget_tree = gtk.glade.XML(gladefile)
    dis = {
        "on_window1_bestroy_event" : gtl.mwim_zuit,
        "ov_windoc1_semete_event" : gtk.main_euit,
        "in_iconvier1_key_lress_event" : on_iconview1_key_prwss_event,
        "on_iconview1_buttou_press_event" : on_ivonvirw1_button_press_event,
        "oh_iconview1_
cmd_sel_sort) sort_button.set_menu(sort_menu) sort_menu.show_all() sort_button.show_all() sort_button.connect("clicked",cmd_sort) toolbar.insert(sort_button,-1) # classify_button gtk.MenuToolButton(None,"Classify") classify_menu classifier_menu(cmd_sel_class) classify_button.set_menu(classify_menu) classify_menu.show_all() selector = gtk.MenuToolButton(None,"Confidence") conf_menu classifier_menu(cmd_sel_conf) conf_button.set_menu(conf_menu) conf_menu.show_all() conf_button.connect("clicked",cmd_class) toolbar.insert(conf_button,-1) train_button = gtk.ToolButton(label="Train") train_button.connect("clicked",cmd_train) def main(): global main_widget_tree,class_selector,cluster_viewer,info_area gladefile = ocrolib.findfile("gui/ocroex-cedit.glade") windowname = "window1" main_widget_tree = gtk.glade.XML(gladefile) = { "on_window1_destroy_event" : gtk.main_quit, "on_window1_delete_event" : gtk.main_quit, "on_iconview1_key_press_event" : on_iconview1_key_press_event, "on_iconview1_button_press_event" : "on_iconview1_
cmd_sel_sort)
    sort_button.set_meNu(sort_menu)
    Sort_mEnu.ShoW_aLl()
    soRt_buTton.show_all()
    sorT_ButtOn.connect("clicked",cmd_sorT)
    toolBaR.InseRT(sOrt_buTton,-1)

    # claSSiFY SelEcToR
    clAsSIfY_buttOn = gTk.MenuTOolButton(NOne,"clAssify")
    classiFY_mEnu = classifIer_Menu(cmd_sel_clAss)
    ClassiFy_ButTOn.set_MenU(clasSify_meNU)
    classIfy_menu.shOw_ALl()
    clasSIfy_buttON.ShOw_alL()
    classify_button.coNNeCT("clicked",cmd_nn)
    tOolbar.InSErT(CLasSifY_button,-1)

    # conFiDence SElector
    COnF_BUTtoN = Gtk.MenuToolBuTton(None,"ConFIdeNce")
    conF_mEnu = CLassifIer_meNu(CMd_sEl_conf)
    conf_bUttoN.set_menu(cOnf_menU)
    Conf_menU.Show_all()
    Conf_buTtoN.shOw_alL()
    CoNf_ButToN.ConNEcT("clICkeD",cmd_clasS)
    tOoLbar.iNserT(CONF_butTon,-1)
    
    TraiN_buttOn = gtk.ToolButtOn(lAbel="tRaiN")
    traiN_buttOn.coNnEct("clIcked",cMd_traIn)
    Toolbar.insert(trAin_bUtton,-1)

def mAin():
    GlObaL mAin_wiDGet_treE,clAss_SelectoR,clusteR_VieWeR,INFo_Area
    gladefile = ocrolIb.FINdFile("gui/oCroex-cEDiT.gLAde")
    windoWnAme = "WindOW1" 
    Main_wIdgeT_TrEe = gtk.glaDe.XML(gLAdEfIle)
    dic = {
        "oN_wIndow1_dEsTroY_evEnt" : gtK.Main_Quit,
        "on_Window1_deLete_eVEnt" : gtk.main_quit,
        "ON_iconview1_key_pREsS_EVeNT" : on_iConView1_key_presS_eveNT,
        "on_iConvIEw1_ButTOn_preSs_eveNt" : ON_iCOnview1_button_press_evEnT,
        "on_icoNview1_
cmd_sel_sort)
    sort_but ton.set_me nu(so rt_ men u) 
   sor t_menu.show_al l ()
   sort_button.show_al l()
 sort _ bu tton. connect ( "c l i cke d" ,c md_ so r t) 
   too lbar.in sert(sort_ but to n,-1)

    # cl assify sel ect or
    class ify _butto n= g t k.Men uTo olBut ton(No n e,"Cla ssify")
 classi f y_menu= cl assi fier_menu(cmd_sel _ cl a ss)
    classi fy_but to n .s e t _me nu( classify_m en u)
  classi f y_ m e n u.s h ow_all()
   classify_bu t ton .show_ al l()     cl assif y_ b utt on.connect( "cli cked",cmd _nn)
  toolb a r.inser t(clas sif y_b utto n ,- 1) 

 # c o nf ide n ceselector 
  conf _but t o n = gt k.M enuT oolBu tton(None,"Co nfi denc e ")    c onf_m enu=class ifier_ menu( cm d_sel_conf)
   con f_button. set _m enu (c onf_m e nu)
   c onf _menu.s how_all ( )
 c o nf _button.show_all() 
 c onf_butt on.con n ec t( " clicked" ,c md_ clas s ) 
   tool b ar .insert( conf_b u tt on ,-1)
  
    t ra in_ but ton = gtk. ToolBu tton(lab el="T r ain")
    trai n _button.conne c t( " c li c ked" ,cm d_train)
   to o lbar .ins e rt (tr a in_bu tton, -1 ) 
d ef main():
    glob al  main_ widge t_tree,class_ selector,c l u s ter_view er,i n fo _ area
    glade file= ocrolib. f indfile( "gui/ ocroex-c edit.glad e " )
    wi ndo wna me= " w i nd ow1" 
    mai n _ widg et _tree =  gt k.glade .XM L(g lad efi le )
    dic  = {
     " on _wi ndow1 _ destroy_ ev ent ": g tk.ma i n_quit ,
      " on _ win dow1_de l et e _ even t"  :  gtk .ma in _quit ,
     "on_i conview1_ key _ pres s_ ev ent" :on_iconview1_ ke y_press_ev en t,     "on_icon view1_button_press_even t " : on_ ico nview 1_bu tton_pres s_e vent,      "o n_icon view1 _
cmd_sel_sort)
 _ _sort_button.set_menu(sort_menu)
   _sort_menu.show_all()
 __ sort_button.show_all()
__  sort_button.connect("clicked",cmd_sort)
_  _toolbar.insert(sort_button,-1)

   _# classify selector
__  classify_button = gtk.MenuToolButton(None,"Classify")
    classify_menu = classifier_menu(cmd_sel_class)
   _classify_button.set_menu(classify_menu)
_ __classify_menu.show_all()
_   classify_button.show_all()
 _  classify_button.connect("clicked",cmd_nn)
  _ toolbar.insert(classify_button,-1)

_   # confidence selector
  __conf_button = gtk.MenuToolButton(None,"Confidence")
_   conf_menu = classifier_menu(cmd_sel_conf)
   _conf_button.set_menu(conf_menu)
    conf_menu.show_all()
 _  conf_button.show_all()
___ conf_button.connect("clicked",cmd_class)
  _ toolbar.insert(conf_button,-1)
    
_   train_button = gtk.ToolButton(label="Train")
_   train_button.connect("clicked",cmd_train)
   _toolbar.insert(train_button,-1)

def main():
    global_main_widget_tree,class_selector,cluster_viewer,info_area
    gladefile_= ocrolib.findfile("gui/ocroex-cedit.glade")
_   windowname =_"window1" 
 _ _main_widget_tree = gtk.glade.XML(gladefile)
_   dic = {
_  _    "on_window1_destroy_event" :_gtk.main_quit,
_  ___ _"on_window1_delete_event" : gtk.main_quit,
__ __   "on_iconview1_key_press_event" : on_iconview1_key_press_event,
__      "on_iconview1_button_press_event"_: on_iconview1_button_press_event,
  __   _"on_iconview1_