#NEWLINE# def show_topic( self , topicid , topn = 10 ) : #NEWLINE# #INDENT# topic = self . wordtopics [ topicid ] #NEWLINE# topic = ( topic / topic . sum ( ) ) #NEWLINE# bestn = numpy . argsort ( topic ) [ : : ( - 1 ) ] [ : topn ] #NEWLINE# beststr = [ ( topic [ id ] , self . id2word [ self ] ) for id in bestn ] #NEWLINE# return beststr