Hacker News new | ask | show | jobs
by hrjet 4359 days ago
Couple of years back, I implemented a natural-language-ish solution for querying ERP data. My approach was to

a. have structured queries that can be precisely parsed

b. provide query completion to guide the user while entering the query

It turned out quite well, if I say so myself. But I never got the time to market it.

It can be seen in action here: http://nlq.lavadip.com/servlet/demo

2 comments

A cool system but I'd suggest this is NLP to the extent SQL or a similar (or somewhat better) query language is NLP. You've made queries in your query language easy but it's more like interactive programming than free-form NLP.

Not that it's a bad application, it's nice, it's just if one extended this model, one would wind-up with a query language, not something new.

Thanks for the praise!

Totally agree; it's not true NLP.

Moreover, true NLP is currently not achievable. We would need an algorithm that passes the Turing test to infer the meaning of a free-form statement.

Like my parent post said, every current NLP system uses some hard-coded assumptions. They just differ in the amount of assumptions.

this is pretty cool ! could you talk about the parser-generator and ER relationships ? I was looking to build something similar for a webapp and was stuck at how to generate the autocompletes.
The autocomplete is provided by my parser-combinator library which is designed in a very generic way. It can be used for any application, not just natural language queries.

About the parser generator: the ER description provides natural language phrases for every entity and relationship. From this the parser builder is able to create parser combinators. There are some hard-coded assumptions and parsers for common data types such as dates and numerical figures.