docstr: Calculate the likelihood based similarity.
  Args:
      terms: list of strings
      doc_topic_dist: list of Topic class
      model: TopicModel class
docstr_tok: ["Calculate","the","likelihood","based","similarity",".","Args",":","terms",":","list","of","strings","doc_topic_dist",":","list","of","Topic","class","model",":","TopicModel","class"]
code: def likelihood_based_similarity(self, terms, doc_topic_dist, model):
      """Calculate the likelihood based similarity.
      Args:
          terms: list of strings
          doc_topic_dist: list of Topic class
          model: TopicModel class
      """
      num_of_term_in_vocab = 0
      result = 0
      for i in range(len(terms)):
          term_id = model.term_id(terms[i])
          if term_id == OOV:
              continue
          num_of_term_in_vocab += 1
          for j in range(len(doc_topic_dist)):
              topic_id = doc_topic_dist[j].tid
              prob = doc_topic_dist[j].prob
              result += (
                  model.word_topic_value(term_id, topic_id)
                  * 1.0
                  / model.topic_sum_value(topic_id)
                  * prob
              )
  
      if num_of_term_in_vocab == 0:
          return result
      return result / num_of_term_in_vocab
  
file_path: PaddleHub/modules/text/language_model/lda_news/semantic_matching.py
imports: import numpy
  from lda_news.vocab import OOV
label_desc: Use image node_id 4 for calling the SemanticMatching obj's underlying member method code with example usage: obj.likelihood_based_similarity(terms, doc_topic_dist, model) and returns: unknown, result