class_docstr: LexRank: Graph-based Centrality as Salience in Text Summarization
  Source: http://tangra.si.umich.edu/~radev/lexrank/lexrank.pdf
class_docstr_tok: ["LexRank",":","Graph-based","Centrality","as","Salience","in","Text","Summarization","Source",":","http",":","\/\/tangra.si.umich.edu\/~radev\/lexrank\/lexrank.pdf"]
code: def _compute_idf(sentences):
      idf_metrics = {}
      sentences_count = len(sentences)
  
      for sentence in sentences:
          for term in sentence:
              if term not in idf_metrics:
                  n_j = sum(1 for s in sentences if term in s)
                  idf_metrics[term] = math.log(
                      sentences_count / (1 + n_j)
                  )
  
      return idf_metrics
  
file_path: sumy/sumy/summarizers/lex_rank.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import math
  from collections import Counter
  from ._summarizer import AbstractSummarizer
label_desc: Use image node_id 8 for calling the LexRankSummarizer obj's underlying member method code with example usage: obj._compute_idf(sentences) and returns: idf_metrics