DataFlux Data Management Studio 2.7: User Guide

Grammar Editor

Overview

Use the Grammar Editor to maintain grammars in a QKB. 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.

Rules in a grammar contain patterns that consist of one or more symbols called categories. There are two types of categories in a grammar: Basic Categories and Derived Categories. The next display shows some of the Basic Categories listed in the EN Business Title grammar in the English locale in the SAS Quality Knowledge Base for Contact Information 24.


EN Business Title Grammar and Its Basic Categories

Basic Categories are used to categorize words in a vocabulary by their semantic type. For example, the Basic Categories in the EN Business Title grammar shown in the previous display are used to categorize words in the EN Business Title vocabulary in the same locale and QKB. Two of the semantic types represented in the previous display are DEPT_W (Department Word) and GRADE_W (Grade Word).

Derived Categories represent sets of one or more rules that specify patterns that define a semantic concept. A pattern in a rule consists of one or more Basic Categories and/or other Derived Categories. For example, the next display shows the Occupation Derived Category.


Occupation Derived Category and Its Rules

The Occupation Derived Category can be derived by any of a number of rules, such as POSITION SEP_W DEPARTMENT. Each rule specifies a pattern containing one or more Basic or Derived Categories, plus a Priority value.

Use the menu or the toolbar to add new grammars, open existing grammars, or maintain the rules and categories in a grammar. The rules tree on the left displays the rules and categories in the current grammar. The Category Properties area on the right enables you to add and edit categories The Rule Properties area on the right enables you to add and edit rules. The status bar at the bottom of the dialog displays the current locale.

Menu

File

New - Enables you to create a new grammar. When you create a new grammar, you must specify a locale with which to associate the grammar. For more information about adding a new grammar, see Adding and Editing Grammars.

Open - Enables you to open a grammar in the current locale.

Close, Save, Save As, Exit - Enable you to perform these operations on the grammar in the editor.

Edit

These options enable you to maintain the rules and categories in a grammar. The options are inactive until you open a grammar.

Add Category- Add a new category for grammar rules.

Change Category Abbreviation - Changes the abbreviation for a selected category. The abbreviation for a category is displayed in the rules tree.

Duplicate Category - Duplicates the selected category.

Add, Copy, Paste Rule - Perform these actions for rules.

Delete Selected Item - Deletes the selected category or rule.

Options

Set QKB - When available, displays the Select Locale dialog so that you can specify the locale where you want to add or maintain a QKB grammar.

Toolbar

Toolbar icons enable you to create, open, or save a grammar.

Rules Tree

The rules tree on the left displays the rules and categories in the current grammar. Each rule specifies one or more Basic or Derived Categories and a Priority value.

Category Properties

Abbreviation - Abbreviation of the category name that this displayed in the rules tree.

Name - Full name of the category.

Type - Basic or Derived category.

Rule Properties

Parent Category - Parent category for the selected rule.

Priority - Priority of the selected rule.

Category - One more categories included in the selected rule.

Related Topics

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

Doc ID: dfU_Cstm_Gram_15000.html