Natural Language Query for .NET search-like interface in C#
features natural language interface c# library
- pure C# rule-based NLP NER library for .NET
- fast and efficient rule-based named entity recognition engine: parses natural language query, performs matching and generates top-combinations in milliseconds.
- implements basic set of matchers for handling typical search queries
- handles relative date phrases like "yesterday", "last week", "last month", "last year", conditions "between", "more than", "less than", "age>18", ranges like "before", "after".
- supports matching in external indexes (like Lucene).
- synonyms for better recognition results and ontology matching.
- easy-to-use: includes a component that automatically configures recognizer by data table description.
- helps users to form a query with autocomplete suggestions
- OPEN SOURCE and FREE for usage in non-SaaS apps that have only one single-server production deployment
download and pricing
|NReco.NLQuery Source Code & Examples||View on GitHub|
NLQuery Commercial License
A commercial license that removes free-usage limitations (perpetual), 1 year of email support.
|$499 - Order Now|
Library is useful for: keyword-based filters for lists/grids, custom semantic search by database(s), search-driven analytics (reports by search), parse incoming messages by bots.
how to use
- Install NReco.NLQuery nuget package
- Configure a recognition engine (C#):
var tblMatchBuilder = new TableMatcherBuilder(); tblMatchBuilder.Add(tasksTableSchema); var recognizer = new Recognizer(tblMatchBuilder.Build());
- Parse user's search query:
var tokens = new Tokenizer().Parse("John closed tasks"); var searchQuery = new TokenSequence(tokens.ToArray()); recognizer.Recognize(searchQuery, matchesCombinationHandler);
matchesCombinationHandlerchoose best recognition with your scoring function and translate matches to formal query like SQL.
- Next steps:
online demo & examples
- NLQuery Demo: Search-based Filter for Data List
- illustrates how to configure recognizers by data table schema
- scoring function for best matches
- generates SQL WHERE by recognition results
- useful for adding user-friendly filter to the data lists or grids
- source code for this demo: NliDataFilter
- NLQuery Example: Search-Driven Reports Builder
- illustrates how to configure recognizers by PivotData object
- scoring function for best pivot table configuration
- generates PivotData SliceQuery by recognition results
- result is a PivotTable object that can be used for rendering crosstab report or pivot chart
- source code for this demo: NliPivotTable
frequently asked questions
- in most cases natural language interfaces don't receive complete (and correct) natural language sentences: good examples are google search queries. NLI input is actually a set of interconnected keywords and phrases; words meaning may be very specific to the context of the search query.
- statistical parsers require training on a massive corpus of questions (queries) and desired recognition, and manual creation of such corpus for each database usually is unacceptable for number of reasons; this might be not possible at all if database content is unique for each user (for instance, in SaaS applications).
- when a database is changed, results may become unreliable without additional re-training. It's hard to incorporate special hints and formal expressions (say, field conditions) that are very desirable for NLI in the business applications.
NLQuery was specially designed for processing natural language queries in the context of tabular data (like database). It aims to be database-independent NLI that doesn't require any training; internally NLQuery mixes formal rule-based approach for named entity recognition by ontology information (database schema, unique values) with probability approach for getting the best formal result that matches a search query.
A commercial license is required for multiple deployments, redistribution as part of your product, or usage in SaaS app.
Refund policy. If you are not satisfied with your purchase, within 30 days from the purchase date, we will fully refund the cost of your order.
Get Download Link
Please let us know where to send the download link for
Make sure your email address is correct and up-to-date.
PivotData Toolkit for .NET.NET components for manipulating multidimensional dataset (in-memory data cube) without OLAP server, aggregating huge datasets, calculating data for pivot tables / charts, web pivot table control for ASP.NET MVC/Blazor.