Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm for Negating Sentences

I was wondering if anyone was familiar with any attempts at algorithmic sentence negation.

For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even "This book is bad".

Obviously, accomplishing this with a high degree of accuracy would probably be beyond the scope of current NLP, but I'm sure there has been some work on the subject. If anybody knows of any work, care to point me to some papers?

like image 235
Kevin Dolan Avatar asked Apr 13 '10 21:04

Kevin Dolan


2 Answers

While I'm not aware of any work that specifically looks at automatically generating negated sentences, I imagine a good place to start would be to read up on linguistics work in formal semantics and pragmatics. A good accessible introduction would be Steven C. Levinson's Pragmatics book.

One issue that I think you'll run into is that it can be very difficult to negate all the information that is conveyed by a sentence. For example, take:

John fixed the vase that he broke.

Even if you change this to John did not fix the vase that he broke, there is a presupposition that there is a vase and that John broke it.

Similarly, simply negating the sentence John did not stopped using drugs as John stopped using drugs still conveys that John, at one point, used drugs. A more thorough negation would be John never used drugs.

Some existing natural language processing (NLP) work that you might want to look at is MacCartney and Manning 2007's Natural Logic for Textual Inference. In this paper they use George Lakoff's notion of Natural Logic and Sanchez Valencia's monotonicity calculus to create software that automatically determines whether one sentence entails another. You could probably use some their techniques for detecting non-entailment to artificially construct negated and contradicting sentences.

like image 68
dmcer Avatar answered Sep 27 '22 02:09

dmcer


I'd recommend checking out wordnet. You can use it to lookup antonyms for a word, so you could conceivably replace "bad" with "not good" since bad is an antonym of good. NLTK has a simple python interface to wordnet.

like image 41
Jacob Avatar answered Sep 23 '22 02:09

Jacob