Skip to main content

A naive suffix tree

Project description

This implementation:

  • works with any python iterable, not just strings, if the items are hashable,

  • values simplicity over speed,

  • is a generalized suffix tree for sets of iterables ([Gusfield1997] §6.4),

  • can convert the tree to .dot if the items convert to strings,

This implementation mostly follows [Gusfield1997] §6, with following differences:

  • indices are 0-based (a Python convention),

  • end indices point one element beyond the end (also a Python convention).

[Gusfield1997] (1,2)

Gusfield, Dan. Algorithms on strings, trees, and sequences. 1997. Cambridge University Press.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suffix-tree-0.0.1.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

suffix_tree-0.0.1-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page