class_docstr: SumBasic: a frequency-based summarization system that adjusts word frequencies as
  sentences are extracted.
  Source: http://www.cis.upenn.edu/~nenkova/papers/ipm.pdf
class_docstr_tok: ["SumBasic",":","a","frequency-based","summarization","system","that","adjusts","word","frequencies","as","sentences","are","extracted",".","Source",":","http",":","\/\/www.cis.upenn.edu\/~nenkova\/papers\/ipm.pdf"]
code: def _compute_ratings(self, sentences):
      word_freq = self._compute_tf(sentences)
      ratings = {}
  
      # make it a list so that it can be modified
      sentences_list = list(sentences)
  
      # get all content words once for efficiency
      sentences_as_words = [
          self._get_content_words_in_sentence(s) for s in sentences
      ]
  
      # Removes one sentence per iteration by adding to summary
      while len(sentences_list) > 0:
          best_sentence_index = self._find_index_of_best_sentence(
              word_freq, sentences_as_words
          )
          best_sentence = sentences_list.pop(best_sentence_index)
  
          # value is the iteration in which it was removed multiplied by -1 so that the first sentences removed (the most important) have highest values
          ratings[best_sentence] = -len(ratings)
  
          # update probabilities
          best_sentence_words = sentences_as_words.pop(
              best_sentence_index
          )
          self._update_tf(word_freq, best_sentence_words)
  
      return ratings
  
file_path: sumy/sumy/summarizers/sum_basic.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from ._summarizer import AbstractSummarizer
label_desc: Use image node_id 15 for calling the SumBasicSummarizer obj's underlying member method code with example usage: obj._compute_ratings(sentences) and returns: ratings