Skip to content

🌳 ES6 Implementation of Ukkonens Algorithm for Suffix Tree Creation.

Notifications You must be signed in to change notification settings

fabsrc/es6-ukkonen-suffix-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Ukkonen's Algorithm: On–line construction of suffix trees

JavaScript (ES6) implementation of Ukkonen's algorithm (https://www.cs.helsinki.fi/u/ukkonen/SuffixT1withFigs.pdf) for the on-line construction of suffix trees.

Example

import { SuffixTree } from './SuffixTree';

var tree = new SuffixTree();
tree.addString('MISSISSIPPI$').print();

Result

["MISSISSIPPI$", 0, Infinity]
["I", 1, 1]
	["SSI", 2, 4]
		["SSIPPI$", 5, Infinity]
		["PPI$", 8, Infinity]
	["PPI$", 8, Infinity]
	["$", 11, Infinity]
["S", 2, 2]
	["SI", 3, 4]
		["SSIPPI$", 5, Infinity]
		["PPI$", 8, Infinity]
	["I", 4, 4]
		["SSIPPI$", 5, Infinity]
		["PPI$", 8, Infinity]
["P", 8, 8]
	["PI$", 9, Infinity]
	["I$", 10, Infinity]
["$", 11, Infinity]

License

Licensed under the MIT License.

About

🌳 ES6 Implementation of Ukkonens Algorithm for Suffix Tree Creation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published