#NEWLINE# def get_bboxes( self ) : #NEWLINE# #INDENT# ( outer , inner ) = [ r for ( i , r ) in self . rects . iterrows ( ) ] #NEWLINE# col_top = ( inner [ 'top' ] + inner [ 'height' ] ) #NEWLINE# col_bot = ( outer [ 'top' ] + outer [ 'height' ] ) #NEWLINE# line_xs = self . lines [ 'x0' ] . tolist ( ) #NEWLINE# return { #NEWLINE# #INDENT# 'h1' : ( outer [ 'x0' ] , outer [ 'top' ] , outer [ 'x1' ] , inner [ 'top' ] ) , #NEWLINE# 'h2' : ( outer [ 'x0' ] , inner [ 'top' ] , outer [ 'x1' ] , col_top ) , #NEWLINE# 'c1' : ( outer [ 'x0' ] , col_top , line_xs [ 0 ] , col_bot ) , #NEWLINE# 'c2' : ( line_xs [ 0 ] , col_top , line_xs [ 1 ] , col_bot ) , #NEWLINE# 'c3' : ( line_xs [ 1 ] , col_top , line_xs [ 2 ] , col_bot ) , #NEWLINE# 'c4' : ( line_xs [ 2 ] , line_xs , outer [ 'x1' ] , col_bot ) , #NEWLINE# #UNINDENT# }