tcl suffix trees

i didn't find any mention of building suffix trees in Tcl, so i looked at Christian Kreibich's libstree and swigged it up to have an interface in Tcl. after playing around for a few hours, i found i got it to work.
load ./

set stree_set [stree: :new_set] stree: :add_string $stree_set "foo to you and me" stree: :add_string $stree_set "foo to me and you" stree: :add_string $stree_set "foo to all the people in the deep blue sea" set my_stree [stree: :make_tree $stree_set] set s [stree: :longest_repeated_substring $my_stree 0 0] puts [stree: :get_strings $s]

stree: :destroy_tree $my_stree
you can find the 0.1 version (with a few bugs, no doubt, here): tclstree-0.1.

during my search i did find this site, Lambda the Ultimate, which has some useful papers on it. while hacking on it i learned more about Tcl in C and about some limitations of swig than i expected to.

Last modified: Saturday, Oct 18, 2003 @ 08:48pm