Named Entity Recognition 25.4
Named Entity Recognition User and Programming Guide

# <pattern>

Element: pattern

Child Elements: none

Description: Defines a pattern used for matching.

Example: `<pattern score=".1" case="insensitive" replace="replacechars" insert_before="prefix_" insert_after="_suffix">cat</pattern>`

Attribute | Value | Default | Description
--- | --- | --- | ---
`pattern` | <actual pattern> |  | A value is required.
`score` | >= 0 | 1 | A score to use to assign any weightings to the matches. A score of `1` is the default score. A score of `0` always excludes the matching tag from the results. You can use this value to specify exceptions to grammar rules. You can use these weightings for a variety of purposes: They can represent the confidence you have in the accuracy of the match (where a value of `1` represents certainty, and lower values represent lesser confidence). They can represent the importance of a match. For example, in the sentiment grammars the score represents the strength of the sentiment. When there are multiple scores, Named Entity Recognition multiplies them together. For example, if a match on an entity has a score of `1.5`, and you use that entity in another entity that has a score of `0.4`, the resulting score is `0.6`. If you specify a minimum score during extraction, Named Entity Recognition extracts only those matches with a sufficiently high score. You can also display the exact scores of any match during extraction. NOTE: OpenText recommends that you set entity and pattern scores to be no lower than `0.01` and no higher than `100`.
`case` | sensitive insensitive inherited | inherited | Determines whether a match is case sensitive. The value `inherited` accepts the case matching mode of the `grammars` parent.
`replace` | <text to replace the match> | <no default> | Named Entity Recognition replaces the text of the match with the specified text.
`insert_before` | <text to insert before the match> | <no default> | Named Entity Recognition inserts the specified text before the text of the match.
`insert_after` | <text to insert after the match> | <no default> | Named Entity Recognition inserts the specified text after the text of the match.
`debug` | true false inherited | inherited | Displays verbose information for the pattern element during compilation. The value `inherited` accepts the debug mode of the <entity> parent.

Copyright 2013-2025 Open Text
Version 25.4 | Last updated October 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.4

Topic Title: <pattern>