OCR Word Fragment Merging via Normalized Distance and Predefined Expressions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Optical character recognition (OCR) tools face challenges in accurately processing scanned documents, particularly receipts, due to issues like poor image quality, small text characters, text miss-orientation, and varying formatting, leading to recognition errors and misalignment of text lines.
Innovation Solution
A computer system that clusters word fragments based on vertical coordinates, rotates fragments to correct orientation, and merges columns using the Needleman-Wunsch alignment algorithm to improve text line alignment, while also merging adjacent word fragments based on normalized distances and predefined expressions to enhance accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If OCR-based tools are used to extract text from scanned documents, then automatic text recognition is achieved, but recognition errors occur due to poor image quality, small text characters, text miss-orientation, and varying formatting
Solution Approach 1:
The patent segments the text extraction process into multiple stages: initial OCR extraction of word fragments, clustering of fragments by vertical coordinates, rotation correction of individual fragments, merging of columns into text lines, and final assembly of complete words. This segmentation allows each stage to address specific error types independently, improving overall recognition reliability while maintaining automation.
Solution Approach 2:
The patent applies preliminary actions by performing rotation correction on individual word fragments before merging them into text lines. By correcting the orientation of each fragment in advance, the system ensures that subsequent merging operations work with properly oriented elements, reducing recognition errors caused by miss-orientation in the original scanned document.
2Reliability
If manual revision of OCR output is performed to fix recognition errors, then text accuracy is improved, but processing time and labor costs increase
Solution Approach 1:
The patent implements self-service by creating an automated post-processing system that corrects OCR errors without human intervention. The system automatically clusters word fragments, rotates misoriented fragments, merges columns into text lines, and assembles complete words using algorithms. This eliminates the need for manual revision while maintaining high text accuracy, thus reducing processing time and labor costs.
3Measurement precision
If clustering of word fragments is performed based on vertical coordinates, then text line alignment is improved, but computational complexity increases
Solution Approach 1:
The patent changes the parameter used for clustering from simple spatial proximity to vertical coordinates. By clustering word fragments based on their vertical position coordinates, the system achieves precise text line alignment. This parameter change provides a clear, quantifiable criterion for grouping fragments that belong to the same text line, improving alignment precision while keeping the computational approach manageable through efficient coordinate-based sorting and grouping algorithms.
4Measurement precision
If rotation correction of word fragments is applied, then text orientation accuracy is improved, but processing complexity increases
Solution Approach 1:
The patent applies local quality by performing rotation correction on individual word fragments rather than the entire document or large sections. Each fragment is analyzed and rotated independently based on its own orientation characteristics. This localized approach allows precise correction of orientation errors in each fragment while keeping the processing complexity manageable by focusing computational resources only on the specific fragment being corrected.
5Reliability
If merging of columns into text lines is performed, then complete word reconstruction is improved, but algorithm complexity increases
Solution Approach 1:
The patent uses an intermediary approach by introducing a column-merging stage as a mediator between fragment-level processing and final word assembly. The system first clusters fragments into columns based on vertical coordinates, then merges these columns into complete text lines by analyzing horizontal relationships and spacing patterns. This intermediary merging stage reconstructs complete words by combining fragments from multiple columns, improving word reconstruction accuracy while managing algorithm complexity through a structured two-stage process.
Data Source
AI summary
Systems and methods for merging adjacent word fragments in outputs of optical character recognition (OCR) systems can include a processor obtaining word fragments associated with OCR data generated from an image. Each word fragment can be associated with a respective text line of a plurality of text lines. The at least one processor can determine, for each pair of adjacent word fragments in a text line, a respective normalized horizontal distance between the pair of adjacent word fragments. The processor can identify one or more pairs of adjacent word fragments that are candidates for merging based on the determined normalized horizontal distances. The processor can determine that a pair of adjacent word fragments, among the one or more pairs of adjacent word fragments that are candidates for merging, matches a predefined expression of a plurality of predefined expressions, and merge that pair of adjacent word fragments into a single word.


