92

I need to implement some NLP in my current module. I am looking for some good library that can help me here. I came across 'LingPipe' but could not completely follow on how to use it.
Basically, we need to implement a feature where the application can decipher customer instructions (delivery instructions) typed in plain english. Eg:

  • Will pick up at 12:00 noon tomorrow
  • Request delivery after 10th June
  • Please do not send before Wednesday
  • Add 10 more units of XYZ to the order
Kai
  • 38,985
  • 14
  • 88
  • 103
Vini
  • 8,299
  • 11
  • 37
  • 49
  • see http://stackoverflow.com/questions/22904025/java-or-python-for-natural-language-processing – alvas Apr 07 '14 at 07:46

3 Answers3

80

LingPipe is very nice and well documented. You can also take a look at:

The last one specifically might be of interest to you, although I don't know whether there are any readily available Java implementations (and maybe that's too big of a gun for your problem anyway :-)

Paul's idea of using a DSL is probably easier and faster to implement, and more reliable to use for your customers. I, too, would recommend looking into that first.

Martin Peck
  • 11,440
  • 2
  • 42
  • 69
n3rd
  • 5,989
  • 4
  • 39
  • 56
  • 1
    I presented my report based on the inputs I gathered from this forum and other places on the net. I also suggested the other options that you suggested and the Biz has decided to keep this on hold (Now begins the R&D to find the best possible candidate). – Vini May 21 '09 at 22:03
  • 1
    If you compare LingPipe and others you listed which one would you prefer? I ask this not specific only for @Winnie's question, I ask it for general purpose. – kamaci Oct 30 '12 at 09:48
  • 1
    Check out MALLET: mallet.cs.umass.edu – Samik R Jan 04 '13 at 23:43
11

I think whether or not you choose to use NLP might depend on the specific requirements for your system. Is it a requirement that free-form english should be accepted, or will only a certain set of instructions be accepted? It might be easier to build a domain specific language that supports what your users need to convey than to do full-on semantic analysis of free-form text.

In the Java space, Groovy has some support for building DSLs.

c4k
  • 4,270
  • 4
  • 40
  • 65
Paul Morie
  • 15,528
  • 9
  • 52
  • 57
  • Here are a few lines from the requirement document: '.. and the user should be able to enter a note or a special instruction in plain english. The system should then parse the user instruction and populate the relevant fields (if any) of the order with the correct values." – Vini May 16 '09 at 01:13
  • 10
    That's a pretty vague requirement. For example, does the note have to be grammatically correct? I'm not sure if the parties that came up with the requirements are familiar with the state of NLP, but the problem they've described is essentially reading comprehension, or natural language understanding, which is one of the problems described as 'the holy grail' of NLP. It's doubtful to me that you'll find a package that can just 'do this' for you -- it's probably far more realistic to give the user a UI where they can specify a limited number of special instructions. – Paul Morie May 16 '09 at 03:09
8

For other JVM languages see

oluies
  • 17,694
  • 14
  • 74
  • 117