NiFi Ingest 25.2
NiFi Ingest

# ContextCharsBeforeMatch

The number of UTF-8 characters to include in the context when Named Entity Recognition sends a match to a Lua post-processing script.

When you configure context characters, Named Entity Recognition sends matches to post-processing with additional context, which you can use in your custom post-processing scripts. For example, you might want to use additional context to judge the correctness of a match, or to augment a match with custom components when it satisfies certain criteria.

You configure the size of the context window by using `ContextCharsBeforeMatch` and ContextCharsAfterMatch. For performance reasons, Named Entity Recognition uses an exact number of characters and does not attempt to break at a token or word boundary.

You retrieve the context in post-processing by using the `getMatchContext` Lua method.

NOTE: Context windows are compatible with pre-filtering.

In tables, context windows are restricted to the cell that contains the match.

Context windows are not compatible with repeated matches (that is, `EdkGetNextRepeatedMatch` is not supported when context is configured).

Type: | Long
Default: | 0
Required: | No
Configuration Section: | Any section that you have defined for Named Entity Recognition settings
Example: | `ContextCharsBeforeMatch=100`
See Also: | TokenWithPunctuation

Copyright 2018-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: Knowledge Discovery NiFi Ingest 25.2

Topic Title: ContextCharsBeforeMatch