I have a lookup table of manufacturer name. I have a second table of misspelled manufacturer names. How can I get the misspelled words corrected in a new, third table showing the before and after using SAS code? My Data set has thousands of distinct misspelled words.
Lookup Table:
Samsung
Sony
Nokia
Dell
Apple
HP
Misspelled Names Table:
Samesung
Soni
Nokya
Doll
Apele
HC
Well, you could use soundex:
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245948.htm
https://blogs.sas.com/content/sgf/2015/01/27/how-to-perform-a-fuzzy-match-using-sas-functions/
Problem is what happens if one of your mispelt ones is actually another name, or exactly between the two. Its really a data capture issue, if a pre-defined list of companies was to be used then it should have been a select from dropdown rather than free text, free text is always an issue.
Thanks, RW9. The code from that blog page helped. Not super accurate, but like you say that's the issue with free-form text and no drop-down.
If it makes you feel any better I've had to clean up such. One project where had an expected list of company names to be common answers we provided the data collection people with what should be entered. I had 18 spellings for what should have been IBM. The most entertaining of which was I>B>M>
You can check if your company has DataFlux. It's designed for exactly this type of matching.
@Fistful_Dollars wrote:
I have a lookup table of manufacturer name. I have a second table of misspelled manufacturer names. How can I get the misspelled words corrected in a new, third table showing the before and after using SAS code? My Data set has thousands of distinct misspelled words.
Lookup Table:
Samsung
Sony
Nokia
Dell
Apple
HP
Misspelled Names Table:
Samesung
Soni
Nokya
Doll
Apele
HC
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.