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-hypernode.com/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
File details
Details for the file suffix-tree-0.0.6.tar.gz
.
File metadata
- Download URL: suffix-tree-0.0.6.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d2d56c9e3a8c2c180e94eed0b185e42482c66aca6f9012b21e7dface0722a7d |
|
MD5 | 3222ac31425e16d56071dd73d669b73e |
|
BLAKE2b-256 | 9b317a9d263708ce20ca1b4bc1bb9a4257b264bd258a4d8ee879585310763441 |
File details
Details for the file suffix_tree-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: suffix_tree-0.0.6-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6576edc6894812d8d6cfc293bf787187401cd1e6cfc1d7d034e2e8114633462 |
|
MD5 | 3aefac6242263f11e9d22c59f23ba920 |
|
BLAKE2b-256 | 56ff97c5c2307642bb2eed08b5ba589a5c54111507aed8c6761cfd655afb5c03 |