code: def _rate_sentences(
      self, document, significant_words, w_h, w_p1, w_p2, w_s1, w_s2
  ):
      rated_sentences = {}
      paragraphs = document.paragraphs
  
      for paragraph_order, paragraph in enumerate(paragraphs):
          sentences = paragraph.sentences
          for sentence_order, sentence in enumerate(sentences):
              rating = self._rate_sentence(sentence, significant_words)
              rating *= w_h
  
              if paragraph_order == 0:
                  rating += w_p1
              elif paragraph_order == len(paragraphs) - 1:
                  rating += w_p2
  
              if sentence_order == 0:
                  rating += w_s1
              elif sentence_order == len(sentences) - 1:
                  rating += w_s2
  
              rated_sentences[sentence] = rating
  
      return rated_sentences
  
file_path: sumy/sumy/summarizers/edmundson_location.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from itertools import chain
  from operator import attrgetter
  from .._compat import ffilter
  from ._summarizer import AbstractSummarizer
label_desc: Use image node_id 5 for calling the EdmundsonLocationMethod obj's underlying member method code with example usage: obj._rate_sentences(document, significant_words, w_h, w_p1, w_p2, w_s1, w_s2) and returns: rated_sentences