Using Existing Data to Improve Concept Recognition
- About Improving Concept Recognition
- Configure Model Builder
- Schedule the Model Builder Job
- Configure the Markup Control to Use the New Model
- Configure the Conversation Viewer Control to Use the New Model
- Define Categories for the Conversation Viewer Control
About Improving Concept Recognition
This section describes how you can configure a model to automatically identify concepts that are already part of your data set. You can schedule a job to run regularly to continuously improve the model, and you can then configure the Markup control or the Conversation Viewer control to use the new model.
Configure Model Builder
This topic describes the steps required to set up the Model Builder for the first time.
- Define the source data
connections. For example:
- From the
Applications menu (
), select Develop Code and Flows.
- Select Library
Connections (
) from the navigation menu.
- Click Add (
).
The Select a Data Source window appears.
- Select the data source that your deployment uses to store internal SAS Visual Investigator data.
- On the
Basic tab, create a new caslib called
vidatathat connects to the fdhdata schema. For example:- Connection
name:
vidata - Short
name:
vidata - Set the
connection scope:
Global - Database:
SharedServices - Port
number:
5432 - Schema
name:
fdhdata - Server: host name of server
- User name: dbmsowner
- Password: dbmsowner password
- Connection
name:
- On the Access Policy tab, ensure that the data is available only to the required users.
- Click Save and connect.
- From the
Applications menu (
- Create the configuration
for the Model Builder:
- Sign in to SAS Studio.
- Open Products/SAS Intelligence &
Investigation Management/Concept/Concept Model
Configuration.sas.
IMPORTANT The files in this folder are provided as examples only, and might be updated if you upgrade your system. It is recommended that you take a copy of the file and complete the following steps on the copied file.
- Update the configuration as required. For information about language interpretation and text interpretation rules, see SAS Text Analytics for Business Applications: Concept Rules for Information Extraction Models. For information about the concept compilation process, see your SAS Visual Text Analytics documentation.
- Run the code.
Schedule the Model Builder Job
This topic describes the steps required to set up the Model Builder job and schedule when it runs.
- Access the SAS Job Execution Web Application by using
this URL:
http://host:port/SASJobExecution
Note: If you do not specify a value for port, the default value of 80 is used.
- Select Products
SAS Intelligence & Investigation
Management
Concept Model Builder and click Submit. - In the Work caslib field, enter the caslib used for working data.
- In the Configuration caslib field, enter the caslib that stores the configuration table.
- In the Configuration table field, enter the table that stores the configuration.
- In the Output caslib field, enter the caslib that stores the binary model table.
- In the Output table field, enter the table that stores the binary model.
- In the Language field, enter the language used by the concepts.
- Select Include predefined concepts if you want to include SAS predefined concepts.
- Click Submit.
- Check the statistics tables to review what has been generated.
- Review the log for any error messages.
- In SAS Job Execution, select Jobs from the navigation menu.
- Select the last successful run of Concept Model Builder.
- Click Schedule job.
- Set the job frequency as required.
Configure the Markup Control to Use the New Model
- In the Manage Investigate and Search interface, click Code Editor on the application toolbar.
- In the Solution
Extensions list, double-click Markup Plug-in — Extract
Concepts.
The Markup plug-in code appears.
- Ensure that the MODEL_TABLE constant points to the correct caslib and table.
- Ensure that the VTA_CONCEPTS constant specifies the concept names from the configuration table.
- Ensure that the VTA_LANGUAGE constant specifies your preferred language.
- Click Update.
- In Page Builder, for each page that
includes a Markup control:
- Open the page.
- Select the Markup control.
- In the Text group
configuration area, add or edit Markup groups as required.
Click
to edit existing Markup groups, or click
to create a new Markup group. For each Markup group, ensure that the appropriate concept is selected in the Name field on the Text Group window.
- Click
to save the updated page.
Configure the Conversation Viewer Control to Use the New Model
- In the Manage Investigate and Search interface, click Code Editor on the application toolbar.
- In the Solution
Extensions list, double-click File Loader Plug-in —
Conversation Loader.
The plug-in code appears.
-
In the ConversationFileLoaderDrugs class, set the targetConceptModel:
const targetConceptModel = "public.nlpModel"; - (Optional) Define categories to be
displayed to users in the Conversation Viewer control. In the
ConversationFileLoaderDrugs class, set the targetCategoryDefinitionFile value to
your categories file. For example, to use the example categories file that is
included with SAS Investigation
Content Pack, specify the following:
const targetCategoryDefinitionFile = "CategoriesDrugsModel.csv";For more information, see Define Categories for the Conversation Viewer Control and View Messages by Category in SAS Investigation Content Pack: User’s Guide.
- Click Update.
Define Categories for the Conversation Viewer Control
Categories that you define in the categories file are displayed on the Categories tab of the Conversation Viewer control. Users can filter messages based on their assigned category.
- Sign in to SAS Studio.
- Do one of the following:
- To update the example categories
file that is included with SAS Investigation Content Pack, open the
CategoriesDrugs.csv file, which is located at Products/SAS
Intelligence & Investigation Management/Conversation
Viewer/Categories/CategoriesDrugs.csv.
IMPORTANT This file is provided only as an example, and might be updated if you upgrade your system. It is recommended that you take a copy of the file and complete the following steps on the copied file.
- To create a new set of categories,
create a new CSV file based on the structure of the CategoriesDrugs.csv file
in this location: Products/SAS Intelligence &
Investigation Management/Conversation
Viewer/Categories/.
Note: If you create a new file, you must set the targetCategoryDefinitionFile value in the plug-in to the file that you created. For more information, see Configure the Conversation Viewer Control to Use the New Model.
- To update the example categories
file that is included with SAS Investigation Content Pack, open the
CategoriesDrugs.csv file, which is located at Products/SAS
Intelligence & Investigation Management/Conversation
Viewer/Categories/CategoriesDrugs.csv.
- Edit the CSV file to update the categories
as required or to create new categories.
The first line of the file lists the columns for each category. Each subsequent line defines a single category. For example, here is the Drug References category:
1:Drug References:(OR, "drug", "drugs", "cocaine", "coke", "heroin", "dealing", "smack") 1 100 highThe Components of Each Category Entry Column Name
Data Type
Description
config
String
This string has three colon-separated elements: a unique ID, a category name, and the list of concepts that are included in the category. For example:
1:Drug References:(OR, "drug", "drugs", "cocaine", "coke", "heroin", "dealing", "smack")Note: The category name is displayed on the Categories tab of the Conversation Viewer control.
id
Numeric
A unique identifier for the category. (For example,
1.)score
Numeric
A score for the category. (For example,
100.)severity
String
A severity for the category. (For example,
high.)For more information about categories, see Overview of the Categories Node in SAS Visual Text Analytics: User’s Guide.