3 ms·
Wouldn't it be better to build a parse tree and then cluster based on the difference between the trees? I think this is called "tree distance", or sometimes "t
by mullr 16y ago
Wouldn't it be better to build a parse tree and then cluster based on the difference between the trees? I think this is called "tree distance", or sometimes "tree edit distance." There seems to be a reasonable amount of research on the subject.
- RiderOfGiraffes 16y agoMuch harder to do with the tools I have immediately to hand, and much harder to visualise the main results without special tools. The "fingerprint string" gives 90% of the effect with very little effort on my part. However, I will investigate further the "tree edit distance" to see if I can bootstrap something quickly, just out of interest. Thanks for the reminder.
- bediger 16y agoYou should probably start with Brenda S Baker's work at Bell Labs: http://www.cs.ucdavis.edu/~devanbu/teaching/289/Schedule_files/baker-wcre95.pdf http://www.cs.ucdavis.edu/~devanbu/teaching/289/Schedule_fil... references the final result. Baker's alumni web page: http://cm.bell-labs.com/cm/cs/who/bsb/index.html http://cm.bell-labs.com/cm/cs/who/bsb/index.html It's unfortunate that Baker's "dup" and "pdiff" haven't gotten the open source treatment, or at least if they have, they're not widespread. SCO could have saved themselves a lot of lawyer's fees by running "dup" over SysV and Linux sources to see what's similar.