Named Entity Recognition Grammars Package 25.2
Named Entity Recognition Grammars User Guide

# Balance Precision and Recall

In many cases, Named Entity Recognition is able to locate entities that are ambiguous, such as a postal code which is simply a five-digit number. In some situations it is desirable to match as many entities as possible, which is called high recall. In other situations, it is desirable to match only entities with a high likelihood of being a useful match, which is called high precision. Each match is given a score value so that you can filter the results.

As described in Entity Context, Named Entity Recognition assigns a higher score to matches located by an entity that requires context than to matches located by the corresponding entity without context. Most matches extracted without context have a score of `0.4`. For example, a context-free date January 18, 1998 might be returned by a Date Of Birth entity with a score of `0.4`. But with context to suggest that it is indeed a date of birth DOB: January 18, 1998, the score is usually above `0.5`.

The post-processing script (see Configure Post Processing) includes a step to validate matches. For example, it can validate some ID numbers by calculating a checksum. The script increases the score of matches that have valid checksums, because this is an indication that the match is more likely to be genuine. Any match that has an invalid checksum is immediately discarded because it cannot be genuine.

When you configure Named Entity Recognition, use the parameters `MinScore` and `PostProcessThreshold` to achieve the desired balance between precision and recall. Named Entity Recognition discards any match with a score lower than `MinScore`. Matches with scores that meet or exceed `MinScore` are then processed by post-processing tasks. After post-processing has finished, Named Entity Recognition discards any match with a score lower than `PostProcessThreshold`.

In the example configuration that is included with the Named Entity Recognition Grammars Package, `MinScore` is set to `0.4` and `PostProcessThreshold` is set to `0.5`. These values have been chosen to return results only if they have a relatively high likelihood of being a useful match. Any match that is located without context can proceed to post-processing, but, unless its score is increased through successful validation, it is then discarded. If you prefer to maximize recall rather than precision, you can reduce or remove these thresholds.

For more information about Named Entity Recognition configuration parameters, refer to the Named Entity Recognition User and Programming Guide.

Copyright 2025 Open Text
Version 25.2 | Last updated April 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: Named Entity Recognition Grammars Package 25.2

Topic Title: Balance Precision and Recall