Entity Recognition Block
Entity Recognition Block
- Published on May 6, 2026
- 6 minute(s) read
To extract meaningful data from documents, it is necessary to identify both context-based and structured information within text. The Entity Recognition Block is a processing block used within a flow to identify and extract this information from your documents. It combines two complementary approaches:
- Context-based recognition — identifying entities based on their meaning and context within the text.
- Pattern-based detection — a rule-based approach that identifies structured data using predefined patterns and keywords.
By combining both approaches, flows can extract a wider range of information from document text with greater accuracy and control. In this article, you’ll learn how to leverage the Entity Recognition Block for your use case.
Context-based recognition
The Entity Recognition Block uses a context-based approach to identify entities based on their meaning and context within the text. Because the block relies on contextual understanding, it is well-suited for extracting information that does not follow a fixed or predictable format, including:
- Names of people
- Names of organizations
- Addresses
How it works
The block analyzes the surrounding text to determine whether a word or phrase represents a specific type of entity. Instead of relying on predefined patterns, it uses a trained model to classify entities based on context. Use this approach when extracting information that:
- does not follow a fixed format,
- depends on context for correct interpretation, or
- may appear in different forms across documents.
What affects the results
Performance depends on the quality and structure of the input text. Key factors include:
- Text quality — errors in transcription (e.g., OICR mistakes) can impact recognition. To learn more, see Text Segmentation.
- Context availability — entities are identified based on surrounding words, so limited context may reduce accuracy.
- Variability in wording— unusual phrasing or formatting can make entity recognition more difficult.
Limitations of context-based recognition
This approach does not rely on pre-defined patterns and may not consistently detect highly structured values. For example, it is not well suited for:
- account numbers,
- IDs, or
- other values that follow a strict format.
In such cases, pattern-based approaches provide more reliable results.
Pattern-based detection
Pattern-based detection is a rule-based approach that identifies structured data using predefined patterns and keywords. It detects entities by:
- Matching text against regular expressions (regex).
- Optionally validating matches using keywords.
This approach is suitable for extracting information that:
- Follows a consistent and predictable format.
- Can be defined using patterns (regular expressions).
- May require precise control over how values are detected.
Typical use cases include the following:
- account numbers
- IDs
- dates
- emails and other formatted values
How it works
It processes text input (typically from a Transcription block) and applies configured rules to detect matching values. It supports two main configuration approaches:
- Regex-based detection— identifies values based on their format.
- Keyword-based detection — narrows down matches using surrounding keywords.
Starting v43, we support detecting entities that span multiple lines or pages, improving accuracy for real-world documents where values may be split across lines or continue onto the next page.
What affects the results
Pattern-based detection performance depends on how well the detection rules are defined and how closely the input text matches those rules.
Key factors include:
- Regex accuracy — incorrectly defined patterns may result in missed or incorrect matches.
- Keyword configuration— using relevant keywords can improve precision by narrowing down matches.
- Input consistency— this approach performs best when the data follows a predictable format.
- Error-tolerance settings — allowing variations in pattern matching can increase coverage but may introduce a False Positive.
Limitations
The pattern-based detection does not interpret meaning and cannot rely on context to identify entities. As a result:
- It may detect values that match a pattern but are not relevant.
- It requires manual configuration and tuning.
- It is less effective for extracting information that varies significantly in wording or structure.
Example
The Entity Recognition Block can extract both context-based and structured values from a customer application form:
.png?sv=2026-02-06&spr=https&st=2026-07-27T09%3A13%3A25Z&se=2026-07-27T09%3A29%3A25Z&sr=c&sp=r&sig=CKbpHU9AHMc12tXGi68Seu4nDwt%2Fiwps3iSZJpKD9l8%3D)
- From this document, the Entity Recognition Block identifies:
- John Doe → Person name (context-based)
- John Doe Inc → Organization (context-based)
- 123 Example Street, Example City → Address (context-based)
- APP-1001 → Application ID (pattern-based)
- john.doe@email.com → Email (pattern-based)
- +1 415 555 0123 → Phone number (pattern-based)
- 10 Mar 2026 → Date (pattern-based)
Regex-based detection
The pattern-based approach allows the system to identify values based on their format, regardless of context.
- For example, using a pattern such as:
[A-Z]{3}-\d{4}
- It detects:
- “APP-1001” or similar structured IDs that match the defined format
Using predefined patterns
The approach includes predefined patterns and keyword types for common entities such as emails, phone numbers, and identification numbers, reducing the need for custom configuration.
From the same document:
- john.doe@email.com → Email
- +1 415 555 0123 → Phone number
- 10 Mar 2026 → Date
These entities can be detected using predefined configurations without defining custom regex patterns.
Unlike the context-based recognition, the pattern-based approach does not rely on context and will match any value that fits the defined pattern. This quality makes it highly effective for structured data but dependent on correct configuration.