Date: Thu, 28 Jun 2007 14:57:44 -0500
Reply-To: Warren Schlechte <Warren.Schlechte@TPWD.STATE.TX.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Warren Schlechte <Warren.Schlechte@TPWD.STATE.TX.US>
Subject: Re: Something better than SOUNDEX ?
Content-Type: text/plain; charset="us-ascii"
I've not used it, but the CompLev Function and the CompCost Functions
might prove useful, based on my understanding of what they're supposed
to do.
Warren Schlechte
-----Original Message-----
From: Richard A. DeVenezia [mailto:rdevenezia@WILDBLUE.NET]
Sent: Thursday, June 28, 2007 2:05 PM
Subject: Something better than SOUNDEX ?
I've heard SOUNDEX can be used to compare two strings for relative
equality.
For these simple samples, soundex doesn't match.
-----------------------------------------
data _null_;
length one two $50;
one = "A life of rhyme does not pay";
two = "A life of crime does not pay";
onex = soundex(one);
twox = soundex(two);
put (_all_) (/) /;
one = "Rhymers have their own style";
two = "Criminals have their own style";
onex = soundex(one);
twox = soundex(two);
put (_all_) (/) /;
run;
-----------------------------------------
A life of rhyme does not pay
A life of crime does not pay
A4116532531
A41126532531
Rhymers have their own style
Criminals have their own style
R5621365234
C655421365234
Are there any other functions that can compare and return a 0 to 100
rating
on the strength of comparison ? Something like :
result = TextsComparator(text1,text2,algorithm-choice);
if result = 100 then
put 'both texts are ' text1 ;
else
if result > 80 then
put 'texts seem close enough for today ' text1 ': ' text2;
Richard A. DeVenezia