Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I calculate tree edit distance? [closed]

Tags:

I need to calculate the edit distance between trees. This paper describes an algorithm, but I can't make heads or tails out of it. Could you describe an applicable algorithm in a more approachable way? Pseudocode or code would both be helpful.

like image 584
108 Avatar asked Jun 30 '09 18:06

108


1 Answers

This Python library implements the Zhang-Shasha algorithm correctly: Zhang-Shasha: Tree edit distance in Python

It began as a direct port of the Java source listed in the currently accepted answer (the one with the tarball link), but that implementation is not correct and is nearly impossible to run at all.

like image 50
Steve Landey Avatar answered Oct 19 '22 03:10

Steve Landey