#NEWLINE# def ReadDocTopicMatrix( self ) : #NEWLINE# #INDENT# self . logger . debug ( '    Loading doc_topic_matrix...' ) #NEWLINE# table = self . db . doc_topic_matrix #NEWLINE# matrix = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# rows = self . db ( table ) . select ( table . doc_index , table . topic_index , table . value ) #NEWLINE# for row in rows : #NEWLINE# #INDENT# doc_index = row . doc_index #NEWLINE# topic_index = row . topic_index #NEWLINE# value = row . value #NEWLINE# if ( doc_index not in matrix ) : #NEWLINE# #INDENT# matrix [ doc_index ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# matrix [ doc_index ] [ topic_index ] = value #NEWLINE# #UNINDENT# self . docsAndTopics = matrix