Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET dll for Natural language to SQL/SPARQL

Tags:

sql

nlp

sparql

I'm trying to build an interface for my tool to query from Semantic/Relational DB using C#.NET

I now need to have a layer above the query layer to convert NL input to SQL/SPARQL, I read through papers of NLIs, The process of making such a layer is such a load for my project besides, it's not the main target, it's an add-on.

I don't care if the dll supports Guided input only or freely input text and handles unmatchings, I just need a dll to start from and add some code on it.

The fact of whether it should support both SQL and SPARQL doesn't really matter, because I can manage to convert one to another in my project's domain (something local)

any idea on available dlls ?

like image 461
smohamed Avatar asked Feb 03 '12 23:02

smohamed


1 Answers

You could try my Natural Language Engine for .NET. Sample project on Bitbucket and Nuget packages available.

Using TokenPhrase in your rules can match any unmatched strings in the input, or quoted strings.

In the next revision that I'll be releasing soon it also supports 'production rules' and operator precedence which make it even easier to define your grammar.

Uniquely it delivers strongly-typed .NET objects and executes your rules in a manner similar to ASP.NET MVC with controllers, dependency injection and action methods. All rules are defined in code simply by writing a method that accepts the tokens you want to match. It includes tokens for common things like numbers, distances, times, weights and temporal expressions including finite and infinite temporal expressions.

I use it in various applications to build SQL queries so it shouldn't be too hard to use it to create SPARQL queries.

like image 109
Ian Mercer Avatar answered Oct 29 '22 07:10

Ian Mercer