On Thu, 2010-07-15 at 16:54 +0100, Richard Quadling wrote: > Hi. > > It seems that users cannot enter a vehicle registration 100% accurately. > > We have recently released a small mobile web app which allows service > engineers/inspectors to enter a vehicle registration number and a pin > number to get service history for the vehicle. > > We are getting around a 40% fail rate on the registrations for the > first time of entry. This drops to around a 1.5% error rate on the > second attempt. > > Most of the time it is simply a case of 2 letters/numbers being > swapped. Sometimes a letter/number is entered for a number/letter. > > 0/O > 1/I/l > 2/Z > 3/E > 4/A > 5/S > 6/G > 7/T > 8/B > 9/q > > Some of the registrations are private and don't obey any format (NOTE: > Trailer registrations aren't the same as vehicle registrations - they > can be anything the owner wants. In some cases we have them as > straight numbers - 1, 2, 3, etc.). > > I'm looking for is a way to compare what they've entered against a > known list and to provide my 10 best guesses. > > What I'm stuck on is what criteria do I use. > > I think something like the old style colour Mastermind game (right > colour in the right place, right colour wrong place, wrong colour). > But that's going to be slow. One of the contracts has over 30,000 > vehicles/trailers available to them. > > Any suggestions really. > > Regards, > > Richard. > I'm not sure how well it would work for things like a registration number, but metaphone keys are pretty good for detecting similar words based on phonetic sounds. If you don't get a match first time, maybe convert all the digits in the reg no. to letters, and create a metaphone key that you compare against the list of other keys in your DB that you already created in the same manner (you'll need to create these first time) Like I said, I'm not sure how well it will work, but it might possibly reduce the failure rate a bit. Also, there's the electric shock treatment. Find out which engineers are the worst typists, and... well you get the idea! Thanks, Ash http://www.ashleysheridan.co.uk