#NEWLINE# def _is_rare_abbrev_type( self , cur_tok , next_tok ) : #NEWLINE# #INDENT# "\n        A word type is counted as a rare abbreviation if...\n          - it's not already marked as an abbreviation\n          - it occurs fewer than ABBREV_BACKOFF times\n          - either it is followed by a sentence-internal punctuation\n            mark, *or* it is followed by a lower-case word that\n            sometimes appears with upper case, but never occurs with\n            lower case at the beginning of sentences.\n        " #NEWLINE# if ( cur_tok . abbr or ( not cur_tok . sentbreak ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# typ = cur_tok . type_no_sentperiod #NEWLINE# count = ( self . _type_fdist [ typ ] + self . _type_fdist [ typ [ : ( - 1 ) ] ] ) #NEWLINE# if ( ( typ in self . _params . abbrev_types ) or ( count >= self . ABBREV_BACKOFF ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( next_tok . tok [ : 1 ] in self . _lang_vars . internal_punctuation ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if next_tok . first_lower : #NEWLINE# #INDENT# typ2 = next_tok . type_no_sentperiod #NEWLINE# typ2ortho_context = self . _params . ortho_context [ typ2 ] #NEWLINE# if ( ( typ2ortho_context & _ORTHO_BEG_UC ) and ( not ( typ2ortho_context & _ORTHO_MID_UC ) ) ) : #NEWLINE# #INDENT# return True