Last reviewed: 3/23/2024 8:36:32 AM

<RULEREF>

A <RULEREF> element serves as a reference to a rule that is included as part of the phrase to recognize. It provides a way to nest rule definitions within one another.

<GRAMMAR LANGID="409">
	<RULE NAME="burgers" TOPLEVEL="ACTIVE">
		<OPT><RULEREF NAME="number"/></OPT>
		<OPT PROPNAME="upsize">DOUBLE</OPT>
		<LIST PROPNAME="burgers">
			<PHRASE>HAMBURGER</PHRASE>
			<PHRASE>CHEESEBURGER</PHRASE>
		</LIST>
	</RULE>
	<RULE NAME="number">
		<LIST PROPNAME="number">
			<PHRASE VALSTR="1">one</PHRASE>
			<PHRASE VALSTR="2">two</PHRASE>
			<PHRASE VALSTR="3">three</PHRASE>
			<PHRASE VALSTR="4">four</PHRASE>
			<PHRASE VALSTR="5">five</PHRASE>
			<PHRASE VALSTR="6">six</PHRASE>
			<PHRASE VALSTR="7">seven</PHRASE>
			<PHRASE VALSTR="8">eight</PHRASE>
			<PHRASE VALSTR="9">nine</PHRASE>
			<PHRASE VALSTR="10">ten</PHRASE>
		</LIST>
	</RULE>
</GRAMMAR>

Attributes

NAME

A string identifier to associated with the element. This attribute is optional.

OBJECT

The PROGID of a COM object that contains either the CFG interpreter or grammar rule. This attribute is optional.

PROPID

NAME attribute of an <ID> element. The <ID> element VAL attribute is returned when recognitions occur. This attribute is optional.

PROPNAME

String identifier to indicate that a PROPID value is returned when recognitions occur. This attribute is optional.

REFID

A numeric identifier associated with the rule to be referenced. This attribute is optional.

URL

A uniform resource locator (URL) address of the rule to be referenced. This attribute is optional.

VAL

A numeric value to return as a property value associated with the recognize phrase. This attribute is optional.

VALSTR

A string value to return as a property value associated with the recognize phrase. This attribute is optional.

WEIGHT

Float value (e.g., .15) that specifies the probability that this phrase versus another phrase in the list is recognized. The combined weights of the phrases in the list should be equal to 1. This attribute is optional.

Children

none

Parents

<LIST>, <OPT>, <PHRASE>, and <RULE>.