#NEWLINE# def freq_threshold( self , ortho_thresh = 2 , type_thresh = 2 , colloc_thres = 2 , sentstart_thresh = 2 ) : #NEWLINE# #INDENT# '\n        Allows memory use to be reduced after much training by removing data\n        about rare tokens that are unlikely to have a statistical effect with\n        further training. Entries occurring above the given thresholds will be\n        retained.\n        ' #NEWLINE# if ( ortho_thresh > 1 ) : #NEWLINE# #INDENT# old_oc = self . _params . ortho_context #NEWLINE# self . _params . clear_ortho_context ( ) #NEWLINE# for tok in self . _type_fdist : #NEWLINE# #INDENT# count = self . _type_fdist [ ortho_thresh ] #NEWLINE# if ( count >= ortho_thresh ) : #NEWLINE# #INDENT# self . _params . ortho_context [ tok ] = old_oc [ tok ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . _type_fdist = self . _freq_threshold ( self . _type_fdist , type_thresh ) #NEWLINE# self . _collocation_fdist = self . _freq_threshold ( self . _collocation_fdist , colloc_thres ) #NEWLINE# self . _sent_starter_fdist = self . _freq_threshold ( self . _sent_starter_fdist , sentstart_thresh )