DataFlux Data Management Studio 2.7: User Guide

Navigating the Grammars Tab

Overview

A grammar is a file that contains a set of rules that represent expected patterns of words in a given context. The parsing system uses a Vocabulary to identify the basic categories for each word. Then the patterns constructed from the categories on those words are compared with rules in the grammar.

The next display shows some of the rules listed in the EN Name grammar in the English locale in the SAS Quality Knowledge Base for Contact Information 24.


Example Grammar

In the previous display, there are many rules that can be used to derive the category N (not pictured), which stands for Name. For example, the GNI_R_FN_R rule represents a pattern containing a given name initial root (GNI_R) followed by a family name root (FN_R). The categories GNI_R and FN_R can then be derived from other rules. For example, the given name initial root (GNI_R) category might be derived from a rule representing a pattern containing a single initial. Grammar rules can be used in Pattern Logic nodes in a QKB definition to discover patterns in an input string.

The next display shows the EN Name grammar in the context of the Name parse definition in the English locale. The grammar is specified in a Pattern Logic node.


Grammar in a QKB Definition

The Grammar Libraries Tab

When you open a QKB in DataFlux Data Management Studio, the contents of the QKB are displayed in a set of tabs on the right-hand side of the screen. The Grammar Libraries tab shows a list of vocabularies that are contained in the QKB.

The list of vocabularies in the Grammar Libraries tab has several columns, as shown in the next display.


Main Columns for the Grammar Tab

The Name column shows the name of a grammar. The Description column contains text about the grammar. The File column contains the physical path to the grammar file.

The Locale column shows the QKB locale with which the grammar is associated. Note that a grammar might be listed even if it is not associated with the locale that you have selected in the Quality Knowledge Bases tree. This is because locales can inherit grammars from ancestors.

If you select a locale and look at the values in the Locale column for a grammar, you will see that some vocabularies are associated directly with the selected locale, while others are associated with the locale’s language, and still others are associated with the Global set of objects. This information is also presented in the icons that are shown for the vocabularies in the list. As shown in the previous display, if an icon has a flag overlay, the grammar is associated directly with a locale. If the icon has a word balloon overlay, it means that the grammar is associated with a language. An earth overlay means that the grammar belongs to the Global set of vocabularies.

If you wish to view only the vocabularies that are associated with a language, select that language in the tree for your QKB in the Administration riser.

If you wish to view only the vocabularies in the Global set, click on Global in the tree for your QKB.

Find a Grammar by Name

To find a grammar with a specific name, click the Find icon (binocular icon) in the lower toolbar. This will toggle on the Find pane. To toggle off the Find pane, click the Find icon again.

Rename and Duplicate Grammar

You can rename a grammar by right-clicking the name and selecting Rename from the context menu. You can also click the name and select Rename from the action menu on the lower toolbar.

You can make a copy of a grammar by right-clicking the name and selecting Duplicate from the context menu. You can also click the name and select Duplicate from the action menu on the lower toolbar.

Create a New Grammar

To create a new grammat, click the New Grammar button on the lower toolbar, or select New Grammar from the action menu on the lower toolbar. The New grammar wizard opens. Specify a name, description, and a locale for the new grammar. After you have saved this information, the new grammar appears in the grammar list, and the Grammar Editor opens. Add categories and rules to the grammar as needed. For details about these tasks, see Adding and Editing Grammars.

Open a Grammar for Editing

To open a grammar for editing, double-click on the grammar in the list, or select the grammar and click the Open icon on the lower toolbar. You might also select the grammar and choose Open in the context menu or in the action menu on the lower toolbar. Update categories and rules in the grammar as needed. For details about these tasks, see Adding and Editing Grammars.

View Definitions That Use a Given Grammar

To view a list of QKB definitions that use a given grammar, select the grammar and choose Usage in the context menu or in the action menu on the lower toolbar. The usage dialog displays a list of the definitions that use the selected grammar. The next display illustrates how the Node Type column in the dialog identifies the kind of node that specifies the grammar in a given definition.


QKB Definitions That Include the EN Name Grammar

Delete a Grammar

To delete a grammar, select the grammar and click the delete icon in the lower toolbar, or choose Delete from the context menu or in the action menu in the lower toolbar. The grammar is removed from the QKB.

Related Topics

Documentation Feedback: yourturn@sas.com
Note: Always include the Doc ID when providing documentation feedback.

Doc ID: DMCust_Grammar_Nav.html