You are here: Customizing Quality Knowledge Bases>Customize - Grammar Editor>Building Grammars

DataFlux Data Management Studio 2.5: User Guide

Customize - Grammar Editor - Building Grammars

You can use the Customize Grammar Editor to build Grammars. We recommend you build one Grammar per parse definition, so repeat the following steps for each parse definition.

  1. Open the Grammar Editor Screen. On the Customize main screen, choose Tools > Grammar Editor. The Grammar Editor dialog appears.
  2. Set Your Locale. Select Options > Set Locale. The Select Locale dialog appears. Click on the appropriate locale, and then click OK. The locale setting is saved from session to session, so you do not need to specify it again unless you need to build a Grammar for a different locale.
  3. Create a New Grammar. On the Grammar Editor dialog, choose File > New. Two top-level containers appear on the Grammar dialog, one for basic categories and one for derived categories. Also, one basic category is always created by default for every Grammar: the NUM category that represents any numeric component in a pattern rule.
  4. Create Basic Categories in a Grammar. Select Edit > Add Category. The Add Category dialog appears. Enter an abbreviation and a descriptive name for your new category, select Basic, and then click OK. You have now created one new basic category, which appears in the Grammar Editor dialog. Repeat this as necessary to establish the basic category types you want to create. For a name parse definition, these might be things like a first name word category, a middle name word category and a last name word category, among others.
  5. Create Derived Categories in a Grammar. After creating several basic categories, you can create derived categories (which are essentially pattern variations) that are built upon those basic categories or on other derived categories. Select Edit > Add Category. The Add Category dialog appears. Enter an abbreviation and a descriptive name for your new category, select Derived, and then click OK. You have now created a new derived category, which appears on the Grammar Editor dialog. Repeat this step as necessary to create new derived categories.
  6. Populate Derived Categories with Rules Built on Other Categories. Select a newly created derived category, and then choose Edit > Add Rule. New fields appear on the right side of the Grammar Editor dialog, displaying the rules for the selected derived category. Click Add to build a new rule from the available categories. A rule must contain at least one category, but can contain many. After creating the new pattern rule from the given category list, assign a Priority. Medium is the default priority for newly created rules. A derived category must have at least one rule, but it can have many as well. Repeat this step as necessary to create new rules for the derived categories.
  7. Save the Grammar. Now that your Grammar is beginning to take shape, save it. Select File > Save. If this is a newly built Grammar, Customize will prompt you for a name.

Related Topics

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

Doc ID: dfU_Cstm_Gram_15001.html