[postgis-tickets] [PostGIS] #2980: directional as a street name should not be abbreviated

PostGIS trac at osgeo.org
Sat Oct 25 03:58:37 PDT 2014


#2980: directional as a street name should not be abbreviated
---------------------------------+------------------------------------------
 Reporter:  robe                 |       Owner:  robe         
     Type:  defect               |      Status:  new          
 Priority:  medium               |   Milestone:  PostGIS 2.2.0
Component:  pagc_address_parser  |     Version:  trunk        
 Keywords:                       |  
---------------------------------+------------------------------------------

Comment(by robe):

 Doing this seems to do the trick though need to test some more before I
 commit.


 {{{
 -- define NORTH and SOUTH as regular words
 INSERT INTO pagc_lex(seq, word, stdword, token, is_custom)
 SELECT seq, word, stdword, token, false
 FROM (VALUES ( 2, 'NORTH', 'NORTH', 1),
  (2, 'SOUTH', 'SOUTH', 1) ) As f(seq,word,stdword,token);

 -- now that we have north and south are regular words if they are seen
 with
 -- an additional word we want it treated as directional token
 (unfortunately the
 -- word token ranks higher causing this one to always be ignored -- so up
 this one

 UPDATE pagc_rules SET RULE = '0 22 1 2 -1 1 2 5 6 -1 1 17' WHERE rule = '0
 22 1 2 -1 1 2 5 6 -1 1 16';

 -- may want to consider lowering the 0 1 2 -1 1 5 6 -1 1    rule -
 }}}


 So after the above change I have:


 {{{SELECT predirabbrev, streetname, streettypeabbrev
 FROM pagc_normalize_address('41 north st, boston, ma 02109');

 predirabbrev | streetname | streettypeabbrev
 -------------+------------+------------------
              | NORTH      | ST


  predirabbrev | streetname | streettypeabbrev
 --------------+------------+------------------
  N            | WASHINGTON | ST

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2980#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list