code: def get_topic_word_relevance(topic_word_distrib, doc_topic_distrib, doc_lengths, lambda_):
      
      p_t = get_marginal_topic_distrib(doc_topic_distrib, doc_lengths)
      p_w = get_marginal_word_distrib(topic_word_distrib, p_t)
  
      logtw = np.log(topic_word_distrib)
      loglift = np.log(topic_word_distrib / p_w)
  
      return lambda_ * logtw + (1-lambda_) * loglift
docs: Calculate the topic-word relevance score with a lambda parameter `lambda_` according to Sievert and Shirley 2014.
      relevance(w,T|lambda) = lambda * log phi_{w,t} + (1-lambda) * log (phi_{w,t} / p(w))
      with phi  .. topic-word distribution
           p(w) .. marginal word probability