A Generalized Suffix Tree for any iterable, with Lowest Common Ancestor retrieval
Project description
A Generalized Suffix Tree for any Python iterable, with Lowest Common Ancestor retrieval.
pip install suffix-tree
This suffix tree:
works with any Python iterable, not just strings, if the items are hashable,
is a generalized suffix tree for sets of iterables,
uses Ukkonen’s algorithm to build the tree in linear time,
does constant-time Lowest Common Ancestor retrieval,
outputs the tree as GraphViz .dot file.
Three different builders have been implemented:
one that follows Ukkonen’s original paper ([Ukkonen1995]),
one that follows Gusfield’s variant ([Gusfield1997]),
and one simple naive algorithm.
PyPi: https://pypi.org/project/suffix-tree/
Ukkonen, Esko. On-line construction of suffix trees. 1995. Algorithmica 14:249-60. http://www.cs.helsinki.fi/u/ukkonen/SuffixT1withFigs.pdf
Gusfield, Dan. Algorithms on strings, trees, and sequences. 1997. Cambridge University Press.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for suffix_tree-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80789135a53002b9ea04b09d7e152d0c07b8608bacd0acc47cfb1588da4a3d5c |
|
MD5 | 3d96b0b07a346faa9fb9f056e15b7c99 |
|
BLAKE2b-256 | 1853fde250854779a65ca3a7ce3e750e767cf2ead30447a840f06015512b9a25 |