def topic_weight(d, word, k):
 return (p_word_given_topic(word, k) * p_topic_given_document(k, d))

def topic_weight ( d , word , k ) : return ( p_word_given_topic ( word , k ) * p_topic_given_document ( k , d ) )
given a document and a word in that document .