class_docstr: An implementation of TextRank algorithm for summarization.
  
  Source: https://web.eecs.umich.edu/~mihalcea/papers/mihalcea.emnlp04.pdf
class_docstr_tok: ["An","implementation","of","TextRank","algorithm","for","summarization",".","Source",":","https",":","\/\/web.eecs.umich.edu\/~mihalcea\/papers\/mihalcea.emnlp04.pdf"]
code: def _rate_sentences_edge(words1, words2):
      rank = sum(words2.count(w) for w in words1)
      if rank == 0:
          return 0.0
  
      assert len(words1) > 0 and len(words2) > 0
      norm = math.log(len(words1)) + math.log(len(words2))
      if numpy.isclose(norm, 0.0):
          # This should only happen when words1 and words2 only have a single word.
          # Thus, rank can only be 0 or 1.
          assert rank in (0, 1)
          return float(rank)
      else:
          return rank / norm
  
file_path: sumy/sumy/summarizers/text_rank.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import math
  from ._summarizer import AbstractSummarizer
label_desc: Use image node_id 8 for calling the TextRankSummarizer obj's underlying member method code with example usage: obj._rate_sentences_edge(words1, words2) and returns: int, float, unknown