#NEWLINE# def _buildrelationindex( self ) : #NEWLINE# #INDENT# freltypes = PrettyList ( ( x for x in XMLCorpusView ( self . abspath ( 'frRelation.xml' ) , 'frameRelations/frameRelationType' , self . _handle_framerelationtype_elt ) ) ) #NEWLINE# self . _freltyp_idx = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _frel_idx = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _frel_f_idx = defaultdict ( set ) #NEWLINE# self . _ferel_idx = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for freltyp in freltypes : #NEWLINE# #INDENT# self . _freltyp_idx [ freltyp . ID ] = freltyp #NEWLINE# for frel in freltyp . frameRelations : #NEWLINE# #INDENT# supF = frel . superFrame = frel [ freltyp . superFrameName ] = Future ( ( lambda fID : ( lambda : self . frame_by_id ( fID ) ) ) ( frel . supID ) ) #NEWLINE# subF = frel . subFrame = frel [ freltyp . subFrameName ] = Future ( ( lambda fID : ( lambda : self . frame_by_id ( fID ) ) ) ( frel . subID ) ) #NEWLINE# self . _frel_idx [ frel . ID ] = frel #NEWLINE# self . _frel_f_idx [ frel . supID ] . add ( frel . ID ) #NEWLINE# self . _frel_f_idx [ frel . subID ] . add ( frel . ID ) #NEWLINE# for ferel in frel . feRelations : #NEWLINE# #INDENT# ferel . superFrame = supF #NEWLINE# ferel . subFrame = subF #NEWLINE# ferel . superFE = Future ( ( lambda fer : ( lambda : fer . superFrame . FE [ fer . superFEName ] ) ) ( ferel ) ) #NEWLINE# ferel . subFE = Future ( ( lambda fer : ( lambda : fer . subFrame . FE [ fer . subFEName ] ) ) ( ferel ) ) #NEWLINE# self . _ferel_idx [ ferel . ID ] = ferel