Filter Tokens (by Region)
(Text Processing)
Synopsis
Filters tokens based on the region around another token.Description
This operator keeps only tokens in a region of a specified token. Overlapping regions are kept as a whole, i.e. if the token occurs several times, the maximum regions around all tokens are built and the union of those regions is delivered.
Input
document
The document port.
Output
document
The document port.
Parameters
- conditionThe condition a document must fulfill to be kept.
- stringThe string that should be compared to.
- regular expressionThe regular expression for that should match.
- case sensitiveSpecifies whether the comparison should be case-sensitive.
- invert conditionSpecifies whether comparison outcome should be inverted.
- tokens beforeThe maximum number of tokens kept before the specified token.
- tokens afterThe maximum number of tokens kept after the specified token.