pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedHowTo divide streetname from house-nr ?
4+ messages / 4 participants
[nested] [flat]
* HowTo divide streetname from house-nr ?
@ 2010-09-23 01:25 Andreas <maps.on@gmx.net>
2010-09-23 02:08 ` Re: HowTo divide streetname from house-nr ? Craig Ringer <craig@postnewspapers.com.au>
2010-09-23 07:12 ` Re: HowTo divide streetname from house-nr ? negora <negora@negora.com>
0 siblings, 2 replies; 4+ messages in thread
From: Andreas @ 2010-09-23 01:25 UTC (permalink / raw)
To: pgsql-sql
Hi,
how could I divide streetnames from housenumbers ?
I have to deal with input like this:
Parkstreet 42
Parkstr. 42
Casle Avenue 42
Casle Str. 42-47
Casle Str. 54 - 55
probaply even
Casle Str. 42-47 a
Perhaps one could cut ap the 1st numeric char and regard everything left
of it as the street name and the rest as house number.
OK, this would fail with "42, Parkstreet" but those aren't to frequent.
How would I do this?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: HowTo divide streetname from house-nr ?
2010-09-23 01:25 HowTo divide streetname from house-nr ? Andreas <maps.on@gmx.net>
@ 2010-09-23 02:08 ` Craig Ringer <craig@postnewspapers.com.au>
1 sibling, 0 replies; 4+ messages in thread
From: Craig Ringer @ 2010-09-23 02:08 UTC (permalink / raw)
To: Andreas <maps.on@gmx.net>; +Cc: pgsql-sql
On 23/09/2010 9:25 AM, Andreas wrote:
> Hi,
>
> how could I divide streetnames from housenumbers ?
You can't, reliably. There are papers written on the subject of
addressing, address analysis, addressing in databases, etc.
How would you handle the address:
Person's Name
RD3 Clemo Rd
Whangarei
? "RD3" is "Rural Delivery Area 3". The posties deliver within the area
by named recipient. This is a real address scheme.
The world is full of weird and wacky addressing. IMO, unless you're
willing to confine your schema to only handling addresses of a
particular area you know about, don't try to normalize address. Even
then, I wouldn't try to normalize addresses with text processing, I'd
ask the user to do it during form entry or not do it at all.
If you're trying to find duplicate addresses, matching addreses, etc,
then IMO you're better off using existing tools that do this with
free-form addresses using national phone databases, postcode databases, etc.
--
Craig Ringer
Tech-related writing at http://soapyfrogs.blogspot.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: HowTo divide streetname from house-nr ?
2010-09-23 01:25 HowTo divide streetname from house-nr ? Andreas <maps.on@gmx.net>
@ 2010-09-23 07:12 ` negora <negora@negora.com>
2010-09-23 10:53 ` Re: HowTo divide streetname from house-nr ? Andreas Schmitz <mailinglist@longimanus.net>
1 sibling, 1 reply; 4+ messages in thread
From: negora @ 2010-09-23 07:12 UTC (permalink / raw)
To: pgsql-sql
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Verdana">I guess that it's impossible to look for a
solution which works on every </font>existing case, specially if
you're handling addresses from several countries. However, if you've
certain control over the user inputs, maybe you could try replacing
certain parts employing some kind of regular expression which removes
numbers at the beginning/end of the string.<br>
<br>
On 23/09/10 03:25, Andreas wrote:
<blockquote cite="mid:4C9AAC85.1000001@gmx.net" type="cite"> Hi,
<br>
<br>
how could I divide streetnames from housenumbers ?
<br>
<br>
I have to deal with input like this:
<br>
<br>
Parkstreet 42
<br>
Parkstr. 42
<br>
Casle Avenue 42
<br>
Casle Str. 42-47
<br>
Casle Str. 54 - 55
<br>
<br>
probaply even
<br>
Casle Str. 42-47 a
<br>
<br>
Perhaps one could cut ap the 1st numeric char and regard everything
left of it as the street name and the rest as house number.
<br>
OK, this would fail with "42, Parkstreet" but those aren't to frequent.
<br>
<br>
How would I do this?
<br>
<br>
</blockquote>
</body>
</html>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: HowTo divide streetname from house-nr ?
2010-09-23 01:25 HowTo divide streetname from house-nr ? Andreas <maps.on@gmx.net>
2010-09-23 07:12 ` Re: HowTo divide streetname from house-nr ? negora <negora@negora.com>
@ 2010-09-23 10:53 ` Andreas Schmitz <mailinglist@longimanus.net>
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schmitz @ 2010-09-23 10:53 UTC (permalink / raw)
To: negora <negora@negora.com>; +Cc: pgsql-sql
The only chance I see is to combine the information about the
localization with the address pattern.
regards
Andreas
On 09/23/2010 09:12 AM, negora wrote:
> I guess that it's impossible to look for a solution which works on
> every existing case, specially if you're handling addresses from
> several countries. However, if you've certain control over the user
> inputs, maybe you could try replacing certain parts employing some
> kind of regular expression which removes numbers at the beginning/end
> of the string.
>
> On 23/09/10 03:25, Andreas wrote:
>> Hi,
>>
>> how could I divide streetnames from housenumbers ?
>>
>> I have to deal with input like this:
>>
>> Parkstreet 42
>> Parkstr. 42
>> Casle Avenue 42
>> Casle Str. 42-47
>> Casle Str. 54 - 55
>>
>> probaply even
>> Casle Str. 42-47 a
>>
>> Perhaps one could cut ap the 1st numeric char and regard everything
>> left of it as the street name and the rest as house number.
>> OK, this would fail with "42, Parkstreet" but those aren't to frequent.
>>
>> How would I do this?
>>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2010-09-23 10:53 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-09-23 01:25 HowTo divide streetname from house-nr ? Andreas <maps.on@gmx.net>
2010-09-23 02:08 ` Craig Ringer <craig@postnewspapers.com.au>
2010-09-23 07:12 ` negora <negora@negora.com>
2010-09-23 10:53 ` Andreas Schmitz <mailinglist@longimanus.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox