Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suffix trees in javascript?

Is there a nice implementation of suffix trees in JavaScript? Something that will take a string (and a separator) and make the appropriate suffix tree?

like image 759
silverasm Avatar asked Apr 19 '11 22:04

silverasm


3 Answers

Here's another implementation I wrote:

https://github.com/eikes/suffixtree/blob/master/js/suffixtree.js

like image 192
eikes Avatar answered Oct 21 '22 21:10

eikes


Probably the most know implementation: http://felix-halim.net/pg/suffix-tree/index.php. But you want to search for an alternative at google site:www.cut-the-knot.org suffix-tree, too. You want too look for Matt Mahoney tutorial about the suffix-tree, too. The best tutorial on the net from a compression expert with source code in c.

like image 26
Micromega Avatar answered Oct 21 '22 20:10

Micromega


find another implementation (ukkonen's) here: http://code.google.com/p/text-indexing/ ; suffixtree.JS is provided along with a HTML visualization

like image 1
cos Avatar answered Oct 21 '22 21:10

cos