Named Entity Recognition 26.1
Named Entity Recognition User and Programming Guide

# Compile

This command creates a compiled Named Entity Recognition grammar file.

    edktool c <grammarfile>

The following table lists the optional parameters for this command.

`-l <licensefile>` | The Named Entity Recognition license to use. You can provide either: A path to the file that contains the license key. This file can include the version key, concatenated to the license key with a semicolon (`;`), or you can copy the `versionkey.dat` to the same directory as the license key file. See Named Entity Recognition Licenses in edktool. The license data. This license data must include the license key and the version key, separated by a semicolon (`;`). If you do not specify a license key, edktool attempts to load the license `licensekey.dat` and `versionkey.dat` in its current working directory. You must specify the license parameter if your license is in a different location.
`-i <inputfile>` | The uncompiled (source) XML Named Entity Recognition grammar file to process. You can also use an ECR file as an input file, with the `-e` option to produce a reduced version of an existing grammar file.
`-e <entity>` | A comma-separated list of entities to include in the output file. When you include entities in the command line, Named Entity Recognition includes only those entities in the output file. Otherwise, Named Entity Recognition includes all public entities from the input file in the output file. You can use wildcard expressions in the entity list. See Wildcard Expressions in edktool.
`-o <outputfile>` | The output file name. If you do not specify the output file name, Named Entity Recognition creates an output file using the XML grammar file name with `.ecr` appended.
`-c <configfile>` | The compilation configuration file to use. See Use a Compilation Configuration File.

When you compile a grammar, the XML file must follow the Named Entity Recognition syntax rules for grammar files. The ECR file is a proprietary format that is optimized for fast loading into the Named Entity Recognition engine at run time. While the engine can load XML grammar files, as well as compiled ECR files, compiling a grammar file makes loading quicker.

Compiled grammar files are binary files, which you cannot read. You can use the `List` option to view the public entities in a compiled grammar file.

## Examples

To compile `mygrammar.xml` into `mygrammar.ecr`:

    edktool c mygrammar.xml

To compile all the entities in the `common` entity type in `mygrammar.xml` into `compiledgrammar.ecr`:

    edktool c -i mygrammar.xml -e common/* -o compiledgrammar.ecr

To compile selected entities from an existing grammar, `original.ecr` into the smaller file `selected.ecr`:

    edktool compile -l license.dat -i original.ecr -e entity1,entity2 -o selected.ecr

Copyright 2013-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Named Entity Recognition 26.1

Topic Title: Compile