Confusability Command-Line Syntax

The command-line syntax for Confusability.exe has the following format.

Confusability /In <input file name(s)> /RecoConfig <configuration file name> /ComparisonType <type> /Out <output file name> /SemanticPath <XPath> /Rule <rule ID> /PhraseFile <list of input phrases>

The following table describes the command-line option names and values for the Confusability tool.

Option Name



Required. The file name and extension of one or more grammar files. Separate multiple file names with a space. The tool accepts the following file formats: .grxml (grammar XML), and .cfg (compiled grammar). For example "MyGrammar.grxml" or "MyCompiledGrammar.cfg". Input files in other formats will generate an error. You cannot specify a rule as part of the file name, for example "MyGrammar.grxml#MyRule ". Use the /Rule option.


Optional. The name of the configuration file to use for the speech recognition engine. If not specified, the tool will look for a default configuration file named “RecoConfig.xml” in the current working directory and in the directory that contains Confusability.exe. The tool will generate an error if you do not supply it with a configuration file.


Optional. Specifies whether the output takes into consideration the semantics of a false accept recognition. Accepts the following values:

  • CompareSemantics. (Default) Confusable terms will not be emitted when their semantics are the same (as specified by the SemanticPath option).

  • IgnoreSemantics. All confusable terms are emitted, whether or not their semantics match.


Required. The name of the file to which the results will be written. The output file provides detailed information about pairs of phrases in a grammar that may be confused during speech recognition. The output file is in XML format and uses elements optimized to describe utterances. The file is empty if no confusable phrases were identified.


Optional. Required when the value for /ComparisonType is CompareSemantics. Specifies the XML node(s) to use when comparing semantics. If the value for this option begins with a forward slash, you must precede it with an additional forward slash, for example //MyXmlNode.

By default, every node is used to compare whether the semantics match. If a string containing a single period "." is specified, then only literal semantics are compared.


Optional. The identifier of the rule from which analysis should begin. The option is only valid when the /In option specifies a single grammar.

You can use this option when you specify a single grammar at the /In option that contains a set of unrelated rules, such as a grammar library. If no rule is specified, the root rule of the grammar is used. If using WebReco, this reference cannot point to a rule in a file on the local computer. You can also limit the scope of confusability analysis by specifying a set of phrases. See the /PhraseFile option.


Optional. An XML file that specifies the set of phrases on which to run the confusability analysis. Use this option to perform confusability analysis on a subset of one or more grammars, or on phrases that are out-of-grammar. The referenced file can contain up to 100,000 phrases. When not specified, the Confusability tool generates a list of up to 100,000 phrases in the specified grammar and performs its analysis on the entire list. See the Phrase Generator Reference Manual for help in generating a subset of phrases from a grammar. You can also limit the scope of confusability analysis by specifying a rule. See the /Rule option.


Optional. Displays a list of acceptable option/value pairs.

  • Command-line options and values are not case-sensitive.

  • Command-line options can be preceded by a forward slash (0x002F), a dash (0x002d), an en dash (0x2013), an em dash (0x2014), or a horizontal bar (0x2015).

  • You can enter option/value pairs in any sequence.

Caution noteCaution

If an existing file has the same name as the file name specified by the /Out option, it will be overwritten. The tool does not warn that a file will be overwritten.

You must either specify a recognition engine configuration file using the /RecoConfig option, or create a default configuration file named "RecoConfig.xml" either in the current directory (the directory for the command line) or in the directory that contains Confusability.exe. Use the configuration file to specify a speech recognition engine to use, to configure the parameters for connecting to it, and to configure its behavior. For more information, see Setting Up the Grammar Development Tools.

You can specify both a rule and a phrase file to analyze a list of phrases for confusability against a specific rule in a grammar. The following example is a legal command-line entry:

Confusability /In MyGrammar.grxml /Out MyOutputFile.xml /Rule MyRule /PhraseFile MyUtterances.utt /RecoConfig MyRecoConfig.xml

The following is a command-line example that uses the /SemanticPath option. Note the additional forward slash preceding the parameter (/Minute) for /SemanticPath.

Confusability.exe -In MyGrammar.grxml -SemanticPath //Minute -Out MyOutputFile.utt -RecoConfig MyRecoConfig.xml