Auto-Splitting

Auto-Splitting

Auto-splitting allows you to define specific rules for splitting submissions into Semi-structured documents. This feature enables different rules for each layout, determining how a sequence of pages from the same layout should be grouped into documents. Previously, splitting rules were applied at the flow level, affecting all layouts in that flow. Now, layout-specific rules are configured in the Layout Management Page, where each layout can have a single, dedicated splitting rule. If no specific rule is set, the system defaults to the existing flow-level settings. In this article, you’ll learn how to use Auto-splitting and how to define your own rules for splitting pages in semi-structured layouts.

Flow-level Splitting logic

Auto-splitting applies predefined rules at the layout level, allowing you to customize how documents should be split during processing. This approach provides more flexibility than the traditional flow-level semi-structured grouping logic, which has the following options:

Learn more about grouping logic in our Semi-structured Grouping Logic article.

Since these settings apply to all semi-structured documents within a flow, the introduction of layout-level auto-splitting allows you to define specific splitting rules for each document type individually.

Layout-level Splitting Logic Configuration

Auto-splitting rules can be defined on the Layout Management page under the Grouping Logic tab and are divided into two main categories:

By default, Auto-Splitting uses the flow-level grouping settings to ensure backward compatibility. If no specific Auto-Splitting rule is configured at the layout level, the system will apply the existing flow settings.

Basic Split (from Flows Settings)

These options replicate the behavior of traditional flow-level grouping logic but can now be configured by layout:

Only multiple consecutive pages from the same layout will be sent to manual review. If a document contains only one page, the system will automatically create a document without sending it for manual review.

Auto-Split (Rule-based splitting)

The rule-based splitting enables more advanced document grouping:

Number Of Pages

# Number of Pages splits documents based on a defined page count. If a document contains exactly that number of pages, it will be split accordingly. However, if the total number of pages isn't evenly divisible by the defined number, the remaining pages will be grouped into a separate document. This rule is useful when dealing with documents that always follow a fixed page structure, such as invoices, forms, or contracts.

To handle cases where the number of pages doesn’t match the expected rule, you can enable Manual Review to check and adjust any inconsistencies.

Regular Expression (Regex) Matching

A Regular Expression (Regex) is a sequence of characters that defines a search pattern, commonly used to match and extract specific text patterns within documents. It allows you to automate how documents are split by identifying consistent text markers, such as titles or page numbers, across pages.

Regex in Hyperscience is Python-compatible for flexible and precise document processing.

Understanding Regex Matching

When a document is being processed, Segmentation divides the text into chunks and arranges them into rows from left to right. The regex is then applied at the row level, meaning:

Splitting Page Types

  1. First Page Regex: Splits documents based on a unique text pattern that appears only on the first page of each document.
  2. Last Page Regex: Splits documents based on a text pattern that appears only on the last page of each document.
  3. Same/All Page Regex: Captures a unique identifier that appears on each page of a document and changes between different documents.

Example Regex Patterns

First Page: ^Invoice Number: \d{6}$ Last Page: ^Total Amount: \d+\.\d{2}$ Consistent Field Across Pages: ^Page \d+ of \d+$

Manual Review for Rule Failures

If a document does not meet the criteria defined in the splitting rules, users can enable manual review to inspect and correct the split before finalizing document classification. This is useful in cases where:

Navigating the Grouping Logic Configurations page

To access the Grouping Logic configurations:

  1. Navigate to Library > Layouts

  2. Open the layout you want to configure by clicking on its name

  3. On the Configuration card, click the Edit button under Grouping Logic

  4. On the Grouping Logic page select the grouping logic configuration you want for your layout

    1. If you’re using Regex, choose the splitting page type from the drop-down menu
    2. Define a Regex rule following the syntax in Python Regex Documentation
  5. Click Save to apply your changes.

Compatibility and Known Limitations

The process of partitioning an image into regions containing text. It is the first step of downstream processing tasks such as Classification and Transcription.