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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.