Combining Information from Multiple Internet Sources
Combining Information from Multiple Internet Sources
Combining Information from Multiple Internet Sources
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Input: Two lists with URLs<br />
Output: Levenshtein distance between lists<br />
int LevenshteinDistance(List list1, List list2)<br />
declare int d[list1.size() + 1, list2.size() + 1]<br />
for i <strong>from</strong> 0 to m<br />
d[i, 0] := i<br />
for j <strong>from</strong> 0 to n<br />
d[0, j] := j<br />
for i <strong>from</strong> 1 to m<br />
for j <strong>from</strong> 1 to n<br />
if list1[i-1] = list2[j-1] then<br />
cost := 0<br />
else cost := 1<br />
d[i, j] := minimum(<br />
d[i-1, j] + 1, // deletion<br />
d[i, j-1] + 1, // insertion<br />
d[i-1, j-1] + cost // substitution<br />
)<br />
return d[list1.size(),list2.size()]<br />
Listing 3.4.4 Pseudo code of variation of algorithm for Levenshtein distance<br />
Next chapter presents conducted tests of the three methods. Each of the methods was<br />
compared to search engines and then methods were compared between themselves. Next chapter<br />
presents those results and contains comments on those.<br />
41