You are viewing limited content. For full access, please sign in.

Question

Question

Smoothing messes up Pattern Mattching?

asked on August 25, 2014

 So I'm using QF and Zone OCR to capture the amount from Checks.  I noticed that some of the check amounts were wrong due to quality...so I added the "Smooth" enhancement as a Local Enhancement to my Zone OCR, and it now messes up my Pattern Matching.  If I disable "smooth" the pattern matching works, but again, some of the amounts are wrong ($136 instead of $135, etc.).  If I enable it...it's like I'm not even using Pattern Matching.  See screenshots below.

 

0 0

Answer

SELECTED ANSWER
replied on August 25, 2014

The value you're putting in to test the process does not have a colon in it after "Check Amount". The regular expression, however, requires one.

1 0

Replies

replied on August 25, 2014

There is not enough in your screenshots to guess what might be going wrong. But it looks like your pattern matching process is set to return the full value when it doesn't find a match.

 

Did you check the processing info pane to see what Zone OCR read and whether Pattern Matching found a match? What is your pattern set to?

0 0
replied on August 25, 2014

Miruna,

My Pattern Match works fine if the "Smooth" is disabled.  I've attached 2 screenshots of the PM properties and the resulting Zone Data.  One is with "Smooth" enabled (Amount is not found in PM), one is with "Smooth" disabled (Amount is captured in PM).  I'm a little confused.

 

0 0
replied on August 25, 2014

Your first screenshot does not show the values that were read at processing time. In the second one, the processing info pane does not show the AmountsPM token value.

0 0
replied on August 25, 2014

Miruna,

The first and second screenshot are from the same QF session so I didn't see a reason to show the AmountsPM token a second time.  As for the values that were read, those are the values that are in my "test value" window...I copied the values read and pasted them into that window.  You'll see that the first screenshot there is no resulting value (Smooth is enabled) and in the second screenshot the value is the correct dollar amount (Smooth is disabled).  Hope this clears it up a little.

0 0
SELECTED ANSWER
replied on August 25, 2014

The value you're putting in to test the process does not have a colon in it after "Check Amount". The regular expression, however, requires one.

1 0
replied on August 26, 2014 Show version history

Miruna,

Perhaps you can shed some light on how I can make this more consistant.  I'm trying to capture the following amount from this document (highlighted in yellow). This is the PM I'm using "Check Amount.\s\S(\d+\S?\d+.\d\d)"  However, because I need to do some image enhancements, sometimes the colons are there and sometimes they're not...is there a better way to do the Pattern so I can guarantee to pick up the amount?  Below are two samples of documents running through the same QF Session and the resulting captured data.

 

 

Information    50    Amount : Sequence Number. 14
Check Amount $4,398.10
Check Account Number. XXXXXXXXX
Payer Name. Unknown    Amount Zone        0    

 

AND

 

Information    51    Amount : Sequence Number: 6
Check Amount. $135.00
Check Account Number: XXXXXXXXX
Payer Name. Unknown    Amount Zone        0    

0 0
replied on August 26, 2014

I think if you make the extra character you have after "Check Amount" optional, your pattern will cover both cases.

0 0
replied on August 26, 2014

I'm struggling with how to do that since it could most likely end up where the colon is disregarded all together in the capture (as above) or it may be : or .   I can get it to work for one, but then it fails for the other.  

0 0
replied on August 26, 2014

Think I might have it...went with Check Amount.?:?\s\S(\d+\S?\d+.\d\d)

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.