Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing a Street Address into Separate Fields
Message
From
13/08/2006 18:04:04
 
 
To
13/08/2006 07:12:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01144790
Message ID:
01145154
Views:
26
Thanks so much Thomas...

>>Actually, I can pick out the street UNLESS the street name has two words in it which is common around here. Then it is basically impossible. Also rules would have to be put into place such as you cannot have a an st_suffix without an st_type or no apt_room without an st_suffix, etc. Otherwise it is basically impossible to determine which value belongs to which field after the street. We do have lookup tables but I was trying to work something out for those addresses that are not in the lookup tables...Just can't be done reliably...
>
>Tracy,
>
>I am also not totally happy with "our" current adress parsing <g>. Since german formating is quite different (Street No. usually trailing) I can offer only general tips that helped me in a few crunches in my tries:
>1) We are also using Ken's suggestion (keep the original, even if only for re-examination)
>2) I lean here more to programmactic analysis, only helped by lookup tables, as sometimes the order of checking is important and such branching is easier for me to maintain in code. YMMV on this one <g>.
>3) One of the first runs is a "word analysis" part which for instance counts the "words" consisting only digits and looks also for special words signifying "trouble" (Floor, Room, Apptmt).
>4) Probably the most important "trick" I employ is checking each adress from both sides to get better fit for things like street no. being shadowed by floor/appartment number. Might help with your "street name has two words" problem if the adress is normal in all other areas.
>5) Another trick is a "worry-level" field in the adress table, which is updated by the parsing routines: this helps me view the special cases easily and perhaps add a few lines to the parsing constructs. Accepting that your code perhaps only works on 99.7% actually will help make the percentage higher by forcing you to actively make provisions/flags for the records not adeqately processed.
>
>regards
>
>thomas
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform