#NEWLINE# def _get_orthography_data( self , tokens ) : #NEWLINE# #INDENT# '\n        Collect information about whether each token type occurs\n        with different case patterns (i) overall, (ii) at\n        sentence-initial positions, and (iii) at sentence-internal\n        positions.\n        ' #NEWLINE# context = 'internal' #NEWLINE# tokens = list ( tokens ) #NEWLINE# for aug_tok in tokens : #NEWLINE# #INDENT# if ( aug_tok . parastart and ( context != 'unknown' ) ) : #NEWLINE# #INDENT# context = 'initial' #NEWLINE# #UNINDENT# if ( aug_tok . linestart and ( context == 'internal' ) ) : #NEWLINE# #INDENT# context = 'unknown' #NEWLINE# #UNINDENT# typ = aug_tok . type_no_sentperiod #NEWLINE# flag = _ORTHO_MAP . get ( ( context , aug_tok . first_case ) , 0 ) #NEWLINE# if aug_tok : #NEWLINE# #INDENT# self . _params . add_ortho_context ( typ , flag ) #NEWLINE# #UNINDENT# if aug_tok . sentbreak : #NEWLINE# #INDENT# if ( not ( aug_tok . is_number or aug_tok . is_initial ) ) : #NEWLINE# #INDENT# context = 'initial' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# context = 'unknown' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( aug_tok . ellipsis or aug_tok . abbr ) : #NEWLINE# #INDENT# context = 'unknown' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# context = 'internal'