Thomas Morton - 2008-04-14

Gavin writes:

I came across your email address on the OpenNLP website.  I'm very new to NLP and I find it very interesting, though I haven't used it before.  I'm trying to find out what software toolkit I should use to interpret the meaning of a short message so that I can use this information to send the appropriate response to that message.  For example, if I receive the message "the class was a waste of time" I might like to send an automatic reply message saying "We're sorry to hear you had a bad experience.  We will take your feedback into account."  Please let me know if you can suggest some software that would help me with this sort of application of NLP.

Hi,
   This is a similar to a document routing or classification task only in this case your documents are pretty short.  If you are just concerned with positive versus negative then its the same type of task but goes by the name sentiment analysis.  There isn't anything out of the box to do this, but OpenNlp is well suited to build this sort of thing.  Here's what this entails:

1. Determine what categories you want to put your messages in.
2. Annotate some so that you can get a sense of whether you have the right categories and whether the classification can be reasonably made.
3. Build a classifier to make the prediction based on your annotated data.

Part three will involve some trial and error.  I would see how well you could do with just the words themselves using the maximum entropy classifier. 
As you do the annotation (part 2), you'll get a sense of what other information might be useful.  OpenNLP can help you get access to more specific information such as sentence boundaries, parts-of-speech, or even clauses.

Hope this helps...Tom