title: Remove negation token and return negated sentence in Spacy
body: <p>I want to use dependency parser of spaCy to determine the scope of negation within my docs. See <a href="https://explosion.ai/demos/displacy?text=RT%20%40trader%20%24AAPL%202012%20is%20ooopen%20to%20Talk%20about%20patents%20with%20GOOG%20definitely%20not%20the%20treatment%20Samsung%20got%20heh%20http%3A%2F%2Ft.co%2FbFPm3CJ3&amp;model=en_core_web_sm&amp;cpu=1&amp;cph=1" rel="nofollow noreferrer">here </a> the dependency visualizer applied to the following string:</p>
  
  <pre><code>RT @trader $AAPL 2012 is ooopen to Talk about patents with GOOG definitely not the treatment Samsung got heh someURL
  </code></pre>
  
  <p>I am able to detect negation cues with</p>
  
  <pre><code> negation_tokens = [tok for tok in doc if tok.dep_ == 'neg']
  </code></pre>
  
  <p>As a result I see that <em>not</em> is the negation modifier of <em>got</em> in my string. Now I want to define the scope of the negation with the following:</p>
  
  <pre><code>negation_head_tokens = [token.head for token in negation_tokens]   
  for token in negation_head_tokens:
      end = token.i
      start = token.head.i + 1
      negated_tokens = doc[start:end]
      print(negated_tokens)
  </code></pre>
  
  <p>This gives the following output:</p>
  
  <pre><code> ooopen to Talk about patents with GOOG definitely not the treatment Samsung
  </code></pre>
  
  <p>Now I have defined the scope, I want to add <em>"not"</em> to certain words conditional on their POS-tag</p>
  
  <pre><code>list = ['ADJ', 'ADV', 'AUX', 'VERB']
  for token in negated_tokens:
      for i in list:
          if token.pos_ == i:
              print('not'+token.text)
  </code></pre>
  
  <p>This gives the following:</p>
  
  <pre><code> notooopen, notTalk, notdefinitely, notnot
  </code></pre>
  
  <p>I want to exclude <em>notnot</em> from my output and return</p>
  
  <pre><code>RT @trader $AAPL 2012 is notooopen to notTalk about patents with GOOG notdefinitely the treatment Samsung got heh someurl
  </code></pre>
  
  <p>How can I achieve this? And do you see improvements in my script from a speed-perspective?</p>
  
  <p><strong>Full script:</strong></p>
  
  <pre><code>import spacy
  
  nlp = spacy.load("en_core_web_sm")
  doc = nlp(u'RT @trader $AAPL 2012 is ooopen to Talk about patents with GOOG definitely not the treatment Samsung got heh someURL)
  list = ['ADJ', 'ADV', 'AUX', 'VERB']
  
  negation_tokens = [tok for tok in doc if tok.dep_ == 'neg']
  negation_head_tokens = [token.head for token in negation_tokens]
  
  for token in negation_head_tokens:
     end = token.i
     start = token.head.i + 1
     negated_tokens = doc[start:end]
     for token in negated_tokens:
        for i in list:
           if token.pos_ == i:
              print('not'+token.text)
  </code></pre>