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 implementation:
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.
This implementation follows [Gusfield1997] Chapter 6, with some differences:
indices are 0-based (a Python convention),
end indices point one element beyond the end (also a Python convention).
PyPi: https://pypi.org/project/suffix-tree/
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.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224cedaf7412138d55dfb8818e603efc68f8ecfe8833cbabb5dc65eac2c8c9ce |
|
MD5 | c03d2f00387c664818e8982bb78b46ba |
|
BLAKE2b-256 | ea1b0bff0ab78fb1618129eecc1a23d4d57ca6a65c819524c4352fee0d3556e5 |