Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 508DCB5DBE0 for ; Wed, 25 May 2011 18:38:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72277-06 for ; Wed, 25 May 2011 21:38:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zebedee.cranntara.net (zebedee.cranntara.net [91.186.7.79]) by mail.postgresql.org (Postfix) with ESMTP id 934FBB5D95B for ; Wed, 25 May 2011 18:38:12 -0300 (ADT) Received: from [88.210.188.180] (helo=bolek.coachhouse) by zebedee.cranntara.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QPLmK-0007NN-Ra for pgsql-sql@postgresql.org; Wed, 25 May 2011 22:38:11 +0100 Received: from dick.coachhouse ([192.168.1.32] ident=tarlika) by bolek.coachhouse with esmtp (Exim 4.69) (envelope-from ) id 1QPLOa-0005gB-3N for pgsql-sql@postgresql.org; Wed, 25 May 2011 22:13:36 +0100 Date: Wed, 25 May 2011 22:13:42 +0100 From: Tarlika Elisabeth Schmitz To: pgsql-sql@postgresql.org Subject: Re: extracting location info from string Message-ID: <20110525221342.14e34046@dick.coachhouse> In-Reply-To: <4DDD1F7C.5040008@gmail.com> References: <20110522210526.0f8b66fa@dick.coachhouse> <20110522230041.28d1bc35@dick.coachhouse> <4DD9BB87.7070000@postnewspapers.com.au> <20110523163341.56edb1aa@dick.coachhouse> <4DDD1F7C.5040008@gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/158 X-Sequence-Number: 35442 On Wed, 25 May 2011 09:25:48 -0600 Rob Sargent wrote: > > >On 05/24/2011 10:57 AM, Lew wrote: >> Tarlika Elisabeth Schmitz wrote: >> >>> CREATE TABLE person >>> ( >>> id integer NOT NULL, >>> "name" character varying(256) NOT NULL, >>> "location" character varying(256), >>> CONSTRAINT person_pkey PRIMARY KEY (id) >>> ); >>> >>> this was just a TEMPORARY table I created for quick analysis >>> of my CSV data (now renamed to temp_person). CREATE TABLE country ( id character varying(3) NOT NULL, -- alpha-3 code "name" character varying(50) NOT NULL, CONSTRAINT country_pkey PRIMARY KEY (id) ); >To minimize the ultimately quite necessary human adjudication, one >might make good use of what is often termed "crowd sourcing": Keep >all the distinct "hand entered" values and a map to the final human >assessment. I was wondering how to do just that. I don't think it would be a good idea to hard code this into the clean-up script. Take, for instance, variations of COUNTRY.NAME spelling. Where would I store these? I could do with a concept for this problem, which applies to a lot of string-type info. -- Best Regards, Tarlika Elisabeth Schmitz