OCR for business card reader in iPhone app - iphone

I was incorporating the OCR in my iPhone app using open source library "tesseract".I have seen some apps on AppStore doing so. I am just wondering how can I segregate the data that it reads from the card, i.e, how will I distinguish between say FirstName and the LastName or between CompanyName and the person's name, how will I distinguish whether the number is Phone# or the Fax# etc.
I wish that there are some standard formats of the Business Cards but I feel that would be hard luck to assume so.Any inkling on that would help a lot.
I posted it over here to gather the thoughts of various developers so that I can come up with some good logic (to make it more accurate) to classify the data that we get from the OCR engine.

Create some guesses how the various text pieces could be interpreted and let the user pick the best one. The format should be pretty standard per country (e.g. in English/German/French etc., the first name is 99.9% in front of the last name)
If now guess is good enough, the user can assign the fields himself
For the firstname/lastname problem, you could maybe consult a local file or web service with common pre-parsed names in the user's country

In order to distinguish the First Name, Last Name, Company Name, Fax or a Phone number use "Regular Expressions".
Example:
Phone - "^(\s*\d\s*){12}$"
Email - "^\w+#[a-zA-Z_]+?.[a-zA-Z]{2,3}$"
In the same way, you can find the regular expressions for other Labels in the below link.
https://www.geeksforgeeks.org/write-regular-expressions/
Thank You.

Related

Business card parser. How to extract related information from business card recognized texts?

I have developed iphone app with OCR scanning feature.
Using Tesseract api, got the text from the image taken.
But now i need to separate each text with respect to name, address, email, phone number etc.
Because business card structure/format is not specific, its bit of difficult to assume.
However few things assume
1) "#" containing string mostly going to be email id.
2) all digits with braces or + sign mostly going to be phone number..
but still there are lots and lots of possibilities.
You will need the help of NSLInguisticTagger class .. This is your best bet or else you will have to create similar logic for each part as you stated above.
You can check the logic we used in this Javascript BCR library, also based on tesseract (the porting in js).
https://github.com/syneo-tools-gmbh/Javascript-BCR-Library

How to read bank account information within an iPhone App?

I'm writing an iPhone App these days, that would need to know the current amount of money available on a bank account, the user has to enter his/her details of course. I've read about HBCI (just need to cover german banks by now), but I can't find something pointing me in the right direction (as I don't know what to search for, I'm not surprised..)
As I said, I just need to cover german banks right now, and I just want the current amount of money. How would I do that? Is there something like openHBCI, that is still maintained and available for iOS? Any hint in the right direction will be much appreciated!
Thanks!
That is a really heavy task .. you also need a database of the german banks with the access points and the hbci versions they accept.
a start point would probably be: http://openhbci.sourceforge.net/, or the successor of the library: http://www.aquamaniac.de/sites/aqbanking/index.php (german).
since it's c++ it should also work on the iphone/ipad

How to implement a search system in a database for an iphone application

This is pretty wide question, but I'm hoping to get a push in the right direction (technologies and methodology).
Ok, I have an iphone app (which I am developing) that works with a web service (c#) through http requests. The web service connects to the underlying database, extracts the necessary data depending on the request and feeds it back to the application.
Now, I need to implement a search system in the app. The user searches for some words, and I need to provide the most relevant results. The search must be performed on different tables in the database. Each table can be searched in a number of columns. For example, when searching through the people table I need to search in the first name, lastname, company, and other fields. Other tables have other important columns.
I have so many questions that I don't even know where to start.
How do I make my sql queries to make the search, but still be fast enough. Do I need to make some extra tables with indexed content somehow?
How should I add relevance factor to the results so I can ultimately filter only the most relevant results? For example, if an user searches for Smith, maybe there is a person named Smith or even a Company. They should be displayed before any other content that can have smith in the description.
I know the question is a little vague/wide but I can explain more if somebody desires.
Thank you
This kind of depends on which language/rdbms you are using on your server. You might checkout various DB search solutions like Sphinx which will do all of that indexing for you and provide a simple Search API. Sphinx for example allows you to prioritize columns, define character mappings (ß->s, ä->a) etc.
In the end I have decided to use Lucene. It's a wonderful piece of technology and even if I had some doubts in the beginning, after reading 3/4 of the book called "Lucene in Action" it was clear to me that it had everything I needed (and much more).
I know it's not a fully-functional searching system (with all the elements needed), but merely a library handling the core of a search system. It will need some work to integrate it with my application/webservice/database. I will let you know how it goes :)
Thanks for your input!

Less is more - auto ZIP code?

You have an international website with a form where people fill in their address.
Wouldn't it be great if people need to fill out one field less? Example:
100 visitors use the form each day
They spend 5 seconds on the ZIP code field
So 5 * 100 * 365 = 182500 seconds or 50 hours a year. And that's just for one form on one website. Multiply that by all websites that ask such information and you can see the time we can save by redesigning this.
You can get someone's ZIP code via geolocation + geocoding. But since a person's current position can easily differ from the city a person lives in, this isn't really usable.
A solution would be to get the ZIP code based on a geolocated (but changeable) country, input city and input street.
The API we could use: http://code.google.com/intl/nl/apis/maps/documentation/geocoding/ or http://developer.yahoo.com/geo/placefinder/.
Now the real question is, which problems would arise (internationalization, localization, accuracy, etc.)?
No-one else has answered this, so I'll have a go.
No, it wouldn't be great if the website filled in the zip code field based on other information. It might work for some people. It would certainly fail for enough people that you'd have to offer a zip code field as an override. Now you have a site with a higher complexity and development cost than one with a conventional zip code field, because you have to test both the automatic zip code guesser and the conventional field.
You'll have a usability hit which comes from people being confused by the two alternatives and not knowing which to choose.
You'll pay an opportunity cost, by spending design and development resources on the zip code guesser, instead of on some other feature which yields a larger usability benefit.
Here are some problems I foresee arising:
Inaccuracy: whatever mechanism you use collects correct hints (IP address location, street address and city) but generates the wrong zip code, due to errors
Remote use: Users entering a different address than their current location, e.g. using a computer at a hotel in a different country to fill out a form related to their home address, so location of IP address of computer is different from location of address in form
Localisation failure: whatever mechanism you use doesn't work with the hints of the user's address, e.g. different address conventions in a foreign country
Provider business terms: you want to use a geocoding service like Google's or Yahoo's APIs, but the license agreement for that service isn't compatible with the business model of your site. For example, they want you to pay if you are geocoding for commercial purposes, or for a site behind a firewall, or more than a certain number of transactions a day
Change in provider situation: you use an external geocoding service, and it goes out of business
etc.
Before taking on a feature like this, I'd take two steps:
User research. Can you identify users for whom the time taken to enter a zip code is a pain point? What about the one of the top three pain points? I'll bet this issue isn't even on your users radar.
Test on existing data. For whatever method you are thinking about using to guess zip code, try it on existing customer data, and see if you can accurately reproduce the zip code the customer entered. This will give you an idea of your error rate. Can you live with this error rate?
If your real question is, could someone please validate my feeling that this is a charming feature, then I probably haven't given you the answer you seek. But you asked, "what problems would arise?"

Resources for Scantron Cognition Enterprise?

I am using Scantron Cognition Enterprise at work to capture data from scanned forms. Building these forms is tedious at best, especially when it would be nice to have a library of pre-built objects to use. Unfortunately, documentation and on-line resources are scarce.
Does anyone have any pointers to find some resources for this tool?
Hey Jason, believe it or not, Scantron is STILL the standard, but this is not the Scantron you probably remember. Although OMR (bubble) forms are still used extensively in education, there are a lot more advanced technologies available to be added to them today.
Concerning Cognition, I looked through the available tags and these would fit:
"document-imaging" - Cognition is a document imaging product and can feed images and index values into most commercially available document storage applications
"OCR" - Optical Character Recognition, or reading machine print.
"ICR" - Intelligent Character Recognition - reading hand writing, usually in a constrained print format (one letter per box like a credt card application.
"datacollection" - the key purpose of Cognition is data collection.
However, there is not a tag for "OMR" - Optical Mark Recognition, or reading bubble choices, similar to the basic Scantron forms of the past. Also, I could not find one for "Key From Image", another purpose that Cognition is used for.
I am a Cognition user as well as someone who markets it and I know that there are a large number of users in North America. Many corporations that use Cognition use it for sensitive HR functions and so might not have their usage of it posted in a searchable format. Many other organizations use it for safety inspections, insurance data entry, and also for testing and surveys - basically anywhere you have a large number of paper forms and need all of the data quickly entered into a database. Many users are using Cognition for sensitive applications are so are not likely to share, but I can share a few I have, you could also contact your Scantron rep and they might have something they could share as well. I have some decent ICR fields built for name, e-mail, address, etc. The ICR fields are best when you build in your own dictionary or database look-ups. The OMR fields are the hard ones to build, but I have a few of these as well. The easiest way to share these is to send you the form that already has the field built into it. You can build your own lookups from txt, xls or db files.