title: Negation handling in NLP
body: <p>I'm currently working on a project, where I want to extract emotion from text. As I'm using conceptnet5 (a semantic network), I can't however simply prefix words in a sentence that contains a negation-word, as those words would simply not show up in conceptnet5's API.</p>
  
  <p>Here's an example:</p>
  
  <blockquote>
    <p>The movie wasn't that good.</p>
  </blockquote>
  
  <p>Hence, I figured that I could use wordnet's lemma functionality to replace adjectives in sentences that contain negation-words like (not, ...).</p>
  
  <p>In the previous example, the algorithm would detect <code>wasn't</code> and would replace it with <code>was not</code>.
  Further, it would detect a negation-word <code>not</code>, and replace <code>good</code> with it's antonym <code>bad</code>.
  The sentence would read:</p>
  
  <blockquote>
    <p>The movie was that bad.</p>
  </blockquote>
  
  <p>While I see that this isn't the most elegant way, and it does probably in many cases produce the wrong result, I'd still like to handle negation that way as I frankly don't know any better approach.</p>
  
  <p><strong>Considering my problem:</strong>
  Unfortunately, I did not find any library that would allow me to replace all occurrences of appended negation-words (<code>wasn't</code> => <code>was not</code>).
  I mean I could do it manually, by replacing the occurrences with a regex, but then I would be stuck with the english language.</p>
  
  <p>Therefore I'd like to ask if some of you know a library, function or <strong>better method</strong> that could help me here.
  Currently I'm using python <code>nltk</code>, still it doesn't seem that it contains such functionality, but I may be wrong.</p>
  
  <p>Thanks in advance :)</p>