Hi,
I have an address field I would like to standardise. the problem I have is I cant seem to perform a classification override for a mulitple words, for example I would like to standardise the words NEW SOUTH WALES to the abreviation of NSW.
First off opening the existing AUAREA rule set and trying to perform classification override does not allow for the space character in the input token.
I have also tried taking a copy of the AUAREA rule set and modifying the classification table by inserting a new classification of:
"NEW SOUTH WALES" NSW S
Any help on this issues would be appreciated.
Cheers,
Joseph.
Standardising multiple word states into state abreviations
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
Ok so I have created a reference table named AUSTATES and entered in the following rows for a start:
"NEW SOUTH WALES" NSW
"SOUTH AUSTRALIA" SA
Now I'm a bit stuck with editing the Pattern file, is this the correct pattern to convert the words to their abreviated form?
&
CONVERT [1] @AUSTATES.TBL TKN
Also I am unsure where I would need to add this pattern. I am using a copy of the AUAREA rule set if this helps.
"NEW SOUTH WALES" NSW
"SOUTH AUSTRALIA" SA
Now I'm a bit stuck with editing the Pattern file, is this the correct pattern to convert the words to their abreviated form?
&
CONVERT [1] @AUSTATES.TBL TKN
Also I am unsure where I would need to add this pattern. I am using a copy of the AUAREA rule set if this helps.
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
Just had another look and I don't think my earlier post will work.
You'll probably have to do it the manual way, eg
& = "NEW" | & = "SOUTH" | & = "WALES"
RETYPE [1] S "NSW"
RETYPE [2] 0
RETYPE [3] 0
Do that sort of thing for each state.
IIRC there is a call to a Common_Patterns subroutine:
&
CALL Common_Patterns
It would probably be easiest to put it above this.
You'll probably have to do it the manual way, eg
& = "NEW" | & = "SOUTH" | & = "WALES"
RETYPE [1] S "NSW"
RETYPE [2] 0
RETYPE [3] 0
Do that sort of thing for each state.
IIRC there is a call to a Common_Patterns subroutine:
&
CALL Common_Patterns
It would probably be easiest to put it above this.