Configuring NLP Settings for a Data Source

Use the NLP Interface to configure natural language processing for a selected data source in your model.

Implementation:

  1. Switch to the Definition panel.
  2. Click to open the Model Data Sources dialog.
  3. (Optional) Create an data connection and a data source, so you can configure its NLP settings.
  4. Select the intended data source.
  5. Click the NLP button to open the Data Source Natural Language Definition dialog.
  6. Switch to the Entity panel.
  7. Use the Noun field to enter a term that describes the items in the selected data source.
  8. (Optional) To include more than one descriptive noun, type them one after the other with a pipe symbol to separate them.

A list of suggestions based on the text you have entered in the Noun field will appear below it. These suggestions will be synonyms or other terms related to the nouns already present.

  1. (Optional) Click any of the suggestions to add it to the Noun list. A separating pipe will automatically be added, and the list of suggestions will update to reflect the new addition.

Suggested nouns are grouped according to their meaning. If a particular word has several definitions, each definition will have the associated nouns shaded in a particular colour. This helps you to identify related nouns and ignore the ones you don't need.

  1. (Optional) Use the Filter field to enter a logical statement, such as "ProductWidth > 5" that determines which fields in the data source will be excluded from the query results regardless of what the user types. Only rows whose contents satisfy the logical statement will be examined as part of the subsequent NLP query.
  2. (Optional) Use the Sort field to apply a default ascending sort order to data returned by the NLP query. Type the name of one of your source data's columns into the field provided.

If the data is queried using a term that applies specific sorting - such as "cheapest products" - the user's query will be used to sort the data instead.

  1. (Optional) Place a minus sign before the name of the Sort column to apply a descending sort order to the data.
  2. (Optional) As you type terms in the Filter and Sort fields, use the validation message to confirm what you have written is valid before saving, or your changes will have no effect.
  3. If you do not wish to add or modify the logic that interprets natural language queries to the selected data source, skip to step 19, or switch to the Expression panel.
  4. Click Add to create a new NLP expression.

To Edit an existing expression, left-click the intended item - adding and editing will open an identical dialog that lets you configure the chosen expression.

  1. Type a valid expression into the Expressions field. When a valid expression has been entered, a message will appear underneath it stating the assigned type.
  2. Fill in the associated fields - these will depend on the type of expression you have entered. Your selections will populate the Examples field.
  3. (Optional) Modify the text in the Examples text box stating how to use the expression, but make sure the new text is valid, and is compatible with the expression.

If you modify the expression in any way, the text you add in the Examples text field will be overwritten.

  1. (Optional) Switch to the Advanced panel.
  2. (Advanced panel Only) Click Reset NLP Data to revert the settings to their default values. This will clear all user-defined NLP settings for your selected data source.
  3. When prompted, click Yes to confirm.
  4. Click Save when you have finished making changes to the NLP settings for the selected data source, or Cancel to revert them. Either of these options will close the active window, and you will return to the previous one.

Use your model to query an NLP data source by creating a natural language search.