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-hypernode.com/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
File details
Details for the file suffix-tree-0.0.4.tar.gz
.
File metadata
- Download URL: suffix-tree-0.0.4.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84d5c301dd86646dbc6f9c69582105e6f1e93e7bcae1b052f54db9c439e12b5 |
|
MD5 | 5685e7a46c57350f6d28fa2af702ca0b |
|
BLAKE2b-256 | b5cad9dfad850516860e3061ab8ecab5f7d9f23bc13656039274affb853f0e4f |
File details
Details for the file suffix_tree-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: suffix_tree-0.0.4-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224cedaf7412138d55dfb8818e603efc68f8ecfe8833cbabb5dc65eac2c8c9ce |
|
MD5 | c03d2f00387c664818e8982bb78b46ba |
|
BLAKE2b-256 | ea1b0bff0ab78fb1618129eecc1a23d4d57ca6a65c819524c4352fee0d3556e5 |