LEADTOOLS Support
Document
Document SDK Questions
OCR splits words with a dash in to separate words
#1
Posted
:
Monday, April 9, 2018 2:07:55 PM(UTC)
Groups: Registered
Posts: 26
Thanks: 3 times
I notice that in my OCR results (Omni professional), values like "194155-CA" and "CM-6734-US" are split in to individual words.
"194155-CA" -
OCR word values:
194155
-CA
"CM-6734-US" -
OCR word values:
CM
-6734
-US
Is there any setting or other option where the resulting OCR word will keep the entire value together?
Thank you.
#2
Posted
:
Thursday, April 12, 2018 1:22:26 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 63
Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)
Hi,
After looking through our documentation, it appears that there isn't a simple setting or property that enables the OmniPage OCR engine to keep words together.
I have tested with both OCR engines and while the OmniPage engine does separate the words, our LEAD engine does not do this and outputs your desired results.
However, if you wish to use the OmniPage engine, a workaround that you can perform would be to use the SetRecognizedCharacters() method after you've recognized the characters. You would need to write your own logic to determine when a hyphen occurs and and manually stitch the words together.
SetRecognizedCharacters() method:
https://www.leadtools.com/help/leadtools/v20/dh/fo/iocrpage-setrecognizedcharacters.htmlA similar example of this can be seen on the page linked below. This example showcases capitalizing the first character in every word, however the process of find a hyphen and manipulating character data should be similar.
GetRecognizedCharacters() method with example code:
https://www.leadtools.com/help/leadtools/v20/dh/fo/iocrpage-getrecognizedcharacters.htmlJoe Zhan
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Friday, April 13, 2018 10:18:25 AM(UTC)
Groups: Registered
Posts: 26
Thanks: 3 times
Thanks a bunch for the work around suggestions.
LEADTOOLS Support
Document
Document SDK Questions
OCR splits words with a dash in to separate words
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.