#NEWLINE# def __init__( self , db , min_pages , lm = 'data/kenlm.apra' ) : #NEWLINE# #INDENT# self . _name = 'mentions' #NEWLINE# self . _refex_count = defaultdict ( int ) #NEWLINE# self . _refex_lookup = defaultdict ( set ) #NEWLINE# answers = set ( ( min_pages for ( x , y ) in text_iterator ( False , '' , False , db , False , '' , limit = ( - 1 ) , min_pages = min_pages ) ) ) #NEWLINE# self . generate_refexs ( answers ) #NEWLINE# self . _text = '' #NEWLINE# self . _lm = kenlm . LanguageModel ( 'data/kenlm.arpa' )