To close the loop on this whole thing...
I made a Virtual Column in the API to clean up my addresses. The problem that I was coming across is that dictionaries are only run once, and you can only run one on each column. For addresses I wanted to clean up multiple parts (street suffix/PO Box, Secondary Unit, and Punctuation)
So I made a virtual column with the following code and I applied it to my Address1 & Address2 columns
Dim sReturn As String = ""
sReturn = oField.Value
sReturn = Import.ApplyDictionary("AddressAbbreviations1",sReturn)
sReturn = Import.ApplyDictionary("AddressAbbreviations2",sReturn)
sReturn = Import.ApplyDictionary("AddressPunkCleanup",sReturn)
Return sReturn
Basically what this does is run three different dictionaries on the fields.
I have attached the three dictionaries as well.
Please let me know if there is a better way to do this!
St. Paul St. should work just fine with this regex:
(?i)(?<= )(st\.$|st$|st.(?=,)|st(?=,))
Here's a screenshot of it in action....
Posted By Wayne Pozzar on 11 Oct 2012 09:50 AM
Perfect, thanks
Also, I found this which is mostly an answer to my original question
http://www.omaticsoftware.com/Forums/tabid/108/aft/288/Default.aspx
Hi Wayne, today I updated the Address Abbreviation dictionaries. If you would like give it a try and let me know if it will work for you that would be great!
Thanks,
Patrick
Here is a copy of the most up to date address dictionary
Can we import the excel to the dictionary? If so is there something referencing the steps?
Wayne Pozzar
Does anyone have a complete address abbreviation dictionary that they are willing to share?
I have found pieces on the forums but nothing complete. I would like to go from Street -> St.
It would be great to have a repository of common use dictionaries like that so that they are easily accessible. Maybe even ship with IOM?
For example:
Title and suffix abbreviations
Zip Code & Phone Number format
Country Codes
State Abbriviations
I have found it pretty difficult to search for this kind of stuff in the forums. I was searching for Dictionary Address Abbreviations and I really only came up with a mess. Anyone have tips for searching for that stuff?
1 person has this question