From 76835f141fa64dbe2d60f6859567fb32908ef681 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 27 May 2021 13:45:12 -0500 Subject: readme --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..824a977 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# zhsh + +An implementation of the [Zhang-Shasha]() algorithm for calculating +tree edit distance. + +Here trees are s-expressions with NON-NULL leaves. + +I.e. Leaves are `(and leaf (atom leaf))` + +## Examples: + + ZHSH> (treedist '((the cat) (sat (on (the mat)))) + '((the cat) (sat (on (the mat ))))) + 0 + + ZHSH> (treedist '((the cat) (sat (on (the mat)))) + '((the cat) (sat (on (a mat ))))) + 11 + + ZHSH> (treedist '((the cat) (sat (on (the mat)))) + '((the ordinary cats) (sit (on (a simple chair ))))) + 21 + + ZHSH> (treedist '((the cat) (sat (on (the mat)) (for (an hour)))) + '((the ordinary cats) (sit (on (a simple chair))))) + 26 + + + -- cgit v1.2.3