def p_word_given_topic(word, topic, beta=0.1):
 return ((topic_word_counts[topic][word] + beta) / (topic_counts[topic] + (W * beta)))

def p_word_given_topic ( word , topic , beta = 0.1 ) : return ( ( topic_word_counts [ topic ] [ word ] + beta ) / ( topic_counts [ topic ] + ( W * beta ) ) )
the fraction of words assigned to _topic_ that equal _word_ .