#NEWLINE# def _handle_lusubcorpus_elt( self , elt ) : #NEWLINE# #INDENT# 'Load a subcorpus of a lexical unit from the given xml.' #NEWLINE# sc = AttrDict ( ) #NEWLINE# try : #NEWLINE# #INDENT# sc [ 'name' ] = elt . get ( 'name' ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# sc [ '_type' ] = 'lusubcorpus' #NEWLINE# sc [ 'sentence' ] = [ ] #NEWLINE# for sub in elt : #NEWLINE# #INDENT# if sub . tag . endswith ( 'sentence' ) : #NEWLINE# #INDENT# s = self . _handle_lusentence_elt ( sub ) #NEWLINE# if ( s is not None ) : #NEWLINE# #INDENT# sc [ 'sentence' ] . append ( elt ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return sc