Need help with Date Matching

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Need help with Date Matching Mon Dec 21, 2015 9:17 pm • by jormsby
I have a rule that has worked for quite awhile. It seems to have quit working (I have others that seem to have quit as well). Here are the specifics. I have a rule that looks for Contents Contain "Harvest". This portion seems to work consistently. The only other condition is a Contents Contain Date Match.

The scanned image contains a date in the format of mm/dd/yy. This is how I have had the rule in the past and it worked, however it does not seem to work now. For troubleshooting, I 'stripped' the matching portion down to just the year to check the matching and then built it up from there to see when it quits matching. In all cases below, the date of interest (and the second occurrence) in the file was 11/25/15. The list below is derived form clicking on the "i" in the rule preview screen (for those times it matched). The items with the quotes are what I had as Date Match attributes. For those items that "matched", the date afterwards was what was highlighted when I clicked the "i" in the preview screen.

In each case where the preview screen indicated a match, the highlighted "matched" data was not even a date contained within the scanned image. The first two "Matches" stated the day as the 21st which was not a date on the scan but was the day that I scanned them (and that I am writing this). The first two matches did mention Months that were on the scan but again, not the right day. The third match was an entirely different day, which was neither on the scan or the date that I performed the scan. However, in each occurrence, the Time seemed to correspond to when I checked matching using the preview.

Below are the various Attributes that I tried.

“12” : (match): Nov 21, 2015, 6:25 PM
“12/“ : (match): Oct 21, 2015, 6:27 PM
“12/31” : (No Match)
“12/…31” : (match)Oct 15, 2015, 6:39 PM
“12/…31/“ : (No Match)
“12/…31…/“ : (No Match)

I was going to post a image showing the scanned file but can not figure out how to on this forum.

I am running OS X 10.11.3 Beta (15D9c) using Hazel 3.3.6 build (1269).

Anyone's help in figuring out why I can not get this date to match would greatly be appreciated.

Regards and Happy Holidays,


John
jormsby
 
Posts: 28
Joined: Mon Oct 13, 2014 7:04 pm

Re: Need help with Date Matching Tue Dec 22, 2015 11:59 am • by Mr_Noodle
In Preview (the app, not in Hazel), open the PDF and then paste it into a TextEdit document. There you can see the raw text. See if there are any extra spaces or if the characters are not what you expect. Especially if this document is OCR'ed, it may be the case where characters were misinterpreted. If you still can't figure it out, email support with an export of the rule and a document demonstrating the problem and I'll take a look at it there.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Need help with Date Matching Tue Dec 22, 2015 8:37 pm • by jormsby
OK, I did what you said with respect to putting the OCR'd text into a text reader. What I found was that for this most recent scanned bill, the date of interest (End date) was way up near the top of the scanned text and was the first occurrence of a date. The "Start Date", which is usually before the "End Date" actually appeared well below the "End Date" and it was actually messed up in that a number had been interpreted as a letter. The rule is set up to look for the second date so, since the order of the dates had somehow changed and the 'second' date was messed up, it did not find it.

Now, here is what is curious to me. I then rescanned the bill using the Abby Fine Reader software to OCR instead of the regular ScanSnap software. This new scan came out differently and the rule worked. The "Start Date" was first with the "End Date" right next to it on the same line. I then switched back to using the ScanSnap software to OCR and this time, the results were the same as the scan using Abby Fine Reader (at least with respect to the dates place in the correct order and right next to each other, there were other differences).

So, it appears that I am having inconsistencies with respect to where scanned & OCR'd text is getting placed in the resulting document.

Any recommendation on which OCR software or settings work best (and most consistently) with Hazel?

Regards,

John
jormsby
 
Posts: 28
Joined: Mon Oct 13, 2014 7:04 pm

Re: Need help with Date Matching Wed Dec 23, 2015 1:19 pm • by Mr_Noodle
The only recommendation I have is being very careful with aligning the document for the scan. Any sort of tilt can affect things. Also, the OCR quality varies between programs so test them out and use the one that works the best for you.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support