#NEWLINE# def _process_record( self , elements , ids , utterance_id ) : #NEWLINE# #INDENT# for tier in self . word_level_markers : #NEWLINE# #INDENT# if ( not ( tier in elements ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for start_pos in sorted ( elements [ tier ] . keys ( ) ) : #NEWLINE# #INDENT# self . _annotations_for_parent [ ( 'a{0}' . format ( utterance_id ) , tier ) ] . append ( poioapi . io . graf . Annotation ( ids [ tier ] [ start_pos ] , elements [ tier ] [ parent_start_pos ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# for tier in self . morpheme_level_markers : #NEWLINE# #INDENT# if ( not ( tier in elements ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# parent_tiers = [ t for t in self . word_level_markers if ( t in self . _tiers ) ] #NEWLINE# parent_tier = parent_tiers [ 0 ] #NEWLINE# for start_pos in sorted ( elements [ tier ] . keys ( ) ) : #NEWLINE# #INDENT# parent_id = None #NEWLINE# for parent_start_pos in sorted ( elements [ parent_tier ] . keys ( ) ) : #NEWLINE# #INDENT# if ( parent_start_pos <= start_pos ) : #NEWLINE# #INDENT# parent_id = ids [ parent_tier ] [ parent_start_pos ] #NEWLINE# #UNINDENT# #UNINDENT# assert ( parent_id != None ) #NEWLINE# self . _annotations_for_parent [ ( parent_id , tier ) ] . append ( poioapi . io . graf . Annotation ( ids [ tier ] [ start_pos ] , elements [ tier ] [ start_pos ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# for tier in self . tag_level_markers : #NEWLINE# #INDENT# if ( not ( tier in elements ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# parent_tiers = [ t for t in self . morpheme_level_markers if ( t in self . _tiers ) ] #NEWLINE# parent_tier = parent_tiers [ 0 ] #NEWLINE# for start_pos in sorted ( elements [ tier ] . keys ( ) ) : #NEWLINE# #INDENT# parent_id = None #NEWLINE# for parent_start_pos in sorted ( elements [ parent_tier ] . keys ( ) ) : #NEWLINE# #INDENT# if ( parent_start_pos <= start_pos ) : #NEWLINE# #INDENT# parent_id = ids [ parent_tier ] [ parent_start_pos ] #NEWLINE# #UNINDENT# #UNINDENT# self . _annotations_for_parent [ ( parent_id , tier ) ] . append ( poioapi . io . graf . Annotation ( ids [ tier ] [ start_pos ] , elements [ tier ] [ start_pos ] ) )