aspose file tools*
The moose likes Java in General and the fly likes post address search Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "post address search" Watch "post address search" New topic
Author

post address search

Frank king
Greenhorn

Joined: Oct 10, 2004
Posts: 10
dear folks here, I am student from singapore. currently I am doing a software design project. one of the crucial parts is to identify the post address that the user keyed in. a simple example, user keys in "city hall xx club" then my java program should be able to varify wether such a place exists.

in order to achieve that, I got to build a database covers certain part of singapore with post address. however, I am not very clear how to build a such kind of database to store large amount and correlated post address.

second, any efficient search alorithm to make the search pocess smooth and fast. problem like "what if user keyed in a wrong character, how can I figure out the correct or highly possible post address?"

thanks a lot
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You might google "address verificatio" or "address standardization" for existing commercial solutions and see if you get any hints. We have used a couple vendors for exactly this kind of address verification. They get a database of all valid addresses from the US Post Office and build their own logic on top. Of course the USPO won't have Singapore but you might find some ideas.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Here in Australia, you just download the database (I've modified it slightly for a particular application) from 'Australia Post'.

I believe in the US, you use a public API distributed by the US Postal Service.

Singapore has gotta have something similar.


Tony Morris
Java Q&A (FAQ, Trivia)
Frank king
Greenhorn

Joined: Oct 10, 2004
Posts: 10
then for search alorithm, what kind of search alorithm is appropriate?
I am not very familar with those search alorithm. can you suggest me one, then I can research on that topic.


thanks
bala kiran
Ranch Hand

Joined: Jun 11, 2004
Posts: 34
Do we have any such APIs from USPS in US? If so, please let me know, I need address validation in our application too.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

The search-algorithm. would depend on the datastructure, and if you find an api, it will have a search-algo build in.
RDBMSs, i.e., have a search-algo. which you just use.


http://home.arcor.de/hirnstrom/bewerbung
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312

in order to achieve that, I got to build a database covers certain part of singapore with post address. however, I am not very clear how to build a such kind of database to store large amount and correlated post address.


็How many record of your data ?

IF you want to search some data in database(large amont of data), you should be created index of column to use in search algorithm.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
second, any efficient search alorithm to make the search pocess smooth and fast. problem like "what if user keyed in a wrong character, how can I figure out the correct or highly possible post address?"


First Solution: create index in serch column.
Second Solution : How to check wrong charactor of post address.

I think, post address have some format such as XXXXX is have values between 10000 to 99999, So you can check input data.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Frank king:
then for search alorithm, what kind of search alorithm is appropriate?
I am not very familar with those search alorithm. can you suggest me one, then I can research on that topic.


thanks


In most database have text-search algorithm in itself.

you chould be create your sql statement to query data and tunning performance such as create index, sql statement, upgrade database server .. etc.
Frank king
Greenhorn

Joined: Oct 10, 2004
Posts: 10
I am using Mysql as my database. thoe searching text alorithm also provided in this software?
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

for example...
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Full Test-Search Function in MySQl

or you can use Lucene
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: post address search
 
Similar Threads
Distance Calculation using Zip Code
please help me out!
need MYSQL searching help
Send e-mail from servlet?
Technology and Career and Money