Question : Weighted Java algorith for string comparison

Hi Experts,

I am looking for an algorithm which i am going to implement in Java for the following use case.

We have a source database and a target database. In the source attributes we are gonna get the following attributes for a user

First Name
Last Name
GUID
SSN
Date of Birth

Each of the above fields have a pre-defined weight assigned

First Name --> 10
Last Name --> 15
GUID --> 70
SSN --> 50
Date of Birth --> 15

Once we retrive the above values, we would want to compare them to the same target attributes for a user.
For ex: when First Name in source matches the First Name in target for a user, we will assign the weight which is 10 and we will traverse through all the attributes of interest for a user and we will assign the weight.

I am interested in the following output

Once the sum of weights match the 'Confirm Match' threshold (some value) - Print confirm match
Once the sum of weights match the 'Partial Match' threshold (some value) - Print partial match
Once the sum of weights match the 'No Match' threshold (some value) - Print no match

I would really appreciate your valuable suggestions.

Answer : Weighted Java algorith for string comparison

So using the code from that link:

[void][Reflection.Assembly]::LoadFrom("C:\IndyNet-Daily-20051007\Indy.Sockets.dll")
$ftp = new-object Indy.Sockets.FTP
$ftp.Disconnect()
$ftp.Host = $ftphost
$ftp.Username = $username
$ftp.Password = $password
$ftp.Connect()
$ftp.Passive=$true;

wc = new-object System.Net.WebClient
$wc.Credentials = New-Object System.Net.NetworkCredential($strFtpUser,$strFtpPass)
$ls = new-object System.Collections.Specialized.StringCollection;
$ftp.List($ls, "", $true);
foreach($file in $ls){
   "Downloading {0} into {1}.." -f $sourceFileName, $targetDir;
    $ftp.Get($sourceFileName, ($targetDir + $sourceFileName), $true, $false);
}
Random Solutions  
 
programming4us programming4us