Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabsrc/es6-ukkonen-suffix-tree

:deciduous_tree: ES6 Implementation of Ukkonens Algorithm for Suffix Tree Creation.
https://github.com/fabsrc/es6-ukkonen-suffix-tree

suffix-tree ukkonen-algorithm

Last synced: 7 days ago
JSON representation

:deciduous_tree: ES6 Implementation of Ukkonens Algorithm for Suffix Tree Creation.

Awesome Lists containing this project

README

        

# 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

```js
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](http://opensource.org/licenses/mit-license.php).