Natural Language Processing
The term Natural Language Processing (NLP) refers to the mechanism by which a computer translates human language - also known as natural language - into a series of logical instructions. This enables creation of applications with which people can interact regardless of whether they understand rigid, machine-friendly syntax. KnowledgeKube provides tools for seamlessly integrating natural language search queries with data-driven applications.
The following is an example of an NLP search string:
"products that cost between 10 and 20 dollars"
There is a strong probability that you understand what this search string means and the kind of results it is meant to return. A computer system, on the other hand, would not understand this string unless it had some capacity for natural language processing.
A typical implementation of NLP involves providing the system with a series of rules that let it deconstruct natural language before converting the constituent parts into machine-readable statements. Doing this to the example above might look something like this:
Sentence Part | Possible Interpretation | Machine-readable Equivalent (e.g. SQL) |
---|---|---|
products | A Noun that refers to a set of values obtained from a data source, such as a table named Products. | SELECT * FROM Products; |
costing | A Verb that refers to a single field in the data source, such as Price. You could use another Noun instead of a verb, such as in the sentence "products with a cost of between 10 and 20 dollars". | WHERE Price |
between 10 and 20 | A Condition applied to the lookup field in order to limit the number of results returned by the search. | BETWEEN 10 AND 20; |
dollars | A Unit, which references a Dimension. These are properties that can define numeric values - in this case, the dimension might be "amount of money" and the unit would be "dollars". This allows advanced queries to convert prices that are not measured in dollars to that unit, letting the corresponding products be included in the search. |
All of the following are also valid examples of natural language statements that could be used to perform a search query:
- "5 most expensive products"
- "dog breeds starting with 'border'"
- "items not in stock"
- "stocked printers costing less than 60 pounds"
- "heaviest car"
- "items sold before 00:00:00 on 02/05/2017"
- "black or white cable longer than 1m"
The more NLP rules there are in a particular system, the easier it is for that system to interpret human language queries, and the more intuitive the experience is for people making those queries.
To access the NLP interface, click to open the Model Data Sources dialog. Every data source in a KnowledgeKube model has its own distinct settings related to the use of NLP. Select the intended data source to access these settings, and click the NLP button.
To learn how to set up natural language processing in a model, refer to the following topics:
Description | Further Reading |
---|---|
Write natural language interpretation rules for a selected data source. | Configuring NLP Settings for a Data Source |
Create a search control inside the selected model. | Creating a Natural Language Search |