Named Entity Recognition 25.4
Named Entity Recognition User and Programming Guide

# getMatchContext

Returns three plain strings: the text before the match, the match text, and the text after the match.

You can configure the number of context characters by using the ContextCharsBeforeMatch and ContextCharsAfterMatch configuration parameters. The match text that returns in the second string is the same value that getMatchedText returns.

This option is not compatible with repeated matches (that is, `EdkGetNextRepeatedMatch` is not supported when you use context).

When you use `getMatchContext` on table data, the context is restricted to the cell that contains the match.

## Syntax

`local before, matched, after = edkmatch:getMatchContext()`

## Returns

A triplet of strings, including the matched text.

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: getMatchContext