#NEWLINE# def read_corpus_list_file( self , file_name ) : #NEWLINE# #INDENT# 'Read a corpus list file.\n\n        Each line has the format:\n        <count> <compound>\n\n        Yield tuples (count, compound, compound_atoms) for each compound.\n\n        ' #NEWLINE# _logger . info ( ( "Reading corpus from list '%s'..." % file_name ) ) #NEWLINE# for line in self . _read_text_file ( line ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( count , compound ) = line . split ( None , 1 ) #NEWLINE# ( yield ( int ( count ) , compound , self . _split_atoms ( compound ) ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# ( yield ( 1 , line , self . _split_atoms ( line ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# _logger . info ( 'Done.' )