Probabilistic Regular Expression Matching for Image Text
Solution Overview
Problem
Existing string searching algorithms, such as the Aho-Corasick algorithm, are inefficient and inaccurate when applied to identifying regular expressions in image-form textual strings due to high recognition errors from Optical Character Recognition (OCR) processes, especially for handwritten or distorted text.
Innovation Solution
A computer-implemented method that constructs a representation of a regular expression and generates a candidate string from an image-form textual string, using a probabilistic approach to ascertain matches by processing candidate characters through a Deterministic Finite State Automaton (DFSA) with multiple states and recognition probabilities, ensuring robustness against errors and artifacts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If Optical Character Recognition (OCR) is used to convert image-form text to searchable text, then text can be processed by string searching algorithms, but recognition errors increase significantly for handwritten or distorted text
Solution Approach 1:
The patent introduces an intermediary probabilistic model between the OCR output and the DFSA matching process. Instead of directly using OCR results, the system generates multiple candidate strings with associated probabilities and uses these as intermediaries to bridge the gap between image-form text and regular expression matching, thereby maintaining search capability while improving accuracy
Solution Approach 2:
The patent applies beforehand cushioning by generating multiple candidate strings with probability weights before performing the DFSA matching. This preparatory step creates a buffer against OCR errors by having alternative candidates ready, so that if the top candidate fails to match, lower-probability alternatives can be evaluated, thus cushioning the impact of recognition errors
2Productivity
If traditional string searching algorithms are applied to OCRed text, then matching can be performed, but error propagation degrades performance
Solution Approach 1:
The patent applies dynamics by making the matching process adaptive rather than static. The system dynamically evaluates multiple candidate strings in order of their probability weights, and can adjust the matching threshold based on confidence levels. This dynamic approach allows the system to maintain high productivity for clear matches while improving reliability for ambiguous cases by exploring alternative candidates
Solution Approach 2:
The patent changes the parameter of candidate evaluation from binary (match/no match) to probabilistic (confidence-weighted matching). By introducing probability weights as a variable parameter and adjusting the matching threshold dynamically, the system can balance between productivity and reliability based on the specific matching context and error characteristics
3Measurement precision
If multiple candidate characters with recognition probabilities are considered, then matching accuracy improves, but processing complexity increases
Solution Approach 1:
The patent applies segmentation by dividing the candidate string evaluation into discrete character-position units. Each position in the candidate string is evaluated independently with its own set of candidate characters and probabilities. This segmentation allows the complex probabilistic matching to be broken down into manageable sub-problems that can be processed systematically through the DFSA states, reducing overall algorithmic complexity
Data Source
AI summary
A method for matching an image-form textual string in an image to a regular expression is disclosed. The method includes constructing a representation of the regular expression and generating a candidate string of characters from the image-form textual string. The method further includes ascertaining whether there exists a match between the image-form textual string and the regular expression, the match is deemed achieved if a probability value associated with the match is above a predetermined matching threshold.


