title: Delete duplicate consecutive occurring words/phrases from paragraph containing case sensitive words
body: <p>Suppose I have a string that looks like</p>
  <p><code>s = &quot;this is a random random this is a random Sentence sentence where phrases and words words repeat. This is the the second sentence sentence of the Same same paragraph&quot;</code></p>
  <p>I want its output to be</p>
  <p><code>this is a random sentence where phrases and words repeat. This is the second sentence of the same paragraph&quot;</code></p>
  <p>This is something that I have tried, it handles the repeated words and phrases but does not take care of case sensitive duplicate words like <code>Sentence sentence</code> and <code>Same same</code></p>
  <pre><code>s = &quot;this is a random random this is a random Sentence sentence where phrases and words words repeat. This is the the second sentence sentence of the Same same paragraph&quot;
  
  def postprocess(s):
      while re.search(r'\b(.+)(\s+\1\b)+', s):
          s = re.sub(r'\b(.+)(\s+\1\b)+', r'\1', s)
      return s
  
  postprocess(s)
  
  </code></pre>
  <p>the output it returns is
  <code>this is a random this is a random Sentence sentence where phrases and words repeat. This is the second sentence of the Same same paragraph</code>
  can anyone help me here?</p>