Named Entity Recognition 25.3
Named Entity Recognition User and Programming Guide

# Unify

This command generates a grammar file that contains one or more combined entities.

A combined entity is a single entity that combines the patterns for a predetermined set of entities. For example, in the PII grammar package there is an entity named `pii/address/all` that matches a postal address from any supported country. This entity was created by combining existing entities such as `pii/address/gb`, `pii/address/fr`, `pii/address/de`, and so on.

Named Entity Recognition can find matches for a combined entity faster than it can find matches for the equivalent list of source entities, because in the combined entity the list of patterns is optimized as a single unit.

Named Entity Recognition automatically returns matches using the source entity names, so you do not lose any information about which entity produced a match. For example, when you run Named Entity Recognition and find matches for `pii/address/all`, Named Entity Recognition reports matches for `pii/address/gb` or `pii/address/fr` rather than for the combined entity.

The following table describes the 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.
`-g <grammarfile>` | A comma-separated list of grammar files that contain the source entities to combine.
`-e <entity>` | The definition for a combined entity, in the form: `combined-name=source-name1,source-name2,...` If you want to create more than one combined entity you can use the `-e` parameter multiple times.
`-c <configfile>` | The path to a JSON file that contains entity definitions. You can combine this option with the `-e` parameter, but you must not include duplicate entity definitions. The JSON file has the following format:
    {
       "combined":[
          {"name":"combined-name",
             "entities":["source-name1","source-name2"]},
          ...
       ]
    }
`-o <outputfile>` | The output grammar file.

## Examples

The following example creates a grammar file named `custom.ecr` that contains an entity named `pii/address/custom`, by combining the address entities for France and Germany.

`edktool unify -o custom.ecr -g address.ecr -e pii/address/custom=pii/address/fr,pii/address/de`

You can create more than one combined entity by passing the `-e` parameter multiple times.

`edktool unify -o custom.ecr -g address.ecr,telephone.ecr -e pii/address/custom=pii/address/fr,pii/address/de -e pii/telephone/context/custom=pii/telephone/context/fr,pii/telephone/context/de`

Copyright 2013-2025 Open Text
Version 25.3 | Last updated July 2025

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 25.3

Topic Title: Unify