Skip to main content

Python implementation of Suffix Trees and Generalized Suffix Trees. Provided also methods with typcal aplications of STrees and GSTrees.

Installation

pip install suffix-trees

Usage

from suffix_trees import STree

# Suffix-Tree example.
st = STree.STree("abcdefghab")
print(st.find("abc")) # 0
print(st.find_all("ab")) # [0, 8]

# Generalized Suffix-Tree example.
a = ["xxxabcxxx", "adsaabc", "ytysabcrew", "qqqabcqw", "aaabc"]
st = STree.STree(a)
print(st.lcs()) # "abc"

Download files

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

Source Distribution

suffix-trees-0.2.4.3.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file suffix-trees-0.2.4.3.tar.gz.

File metadata

File hashes

Hashes for suffix-trees-0.2.4.3.tar.gz
Algorithm Hash digest
SHA256 23cb3c23997841bbaacd8d9fe0a3b1d1d885e6c7ce10ce353ebb5449822fe1b3
MD5 43278e1adeee2b1de25cc1a9b9b46bda
BLAKE2b-256 7b568baac33023351dd5988c616ccd9a3b885f16a3ebf6c636f8543d5e3661b1

See more details on using hashes here.

Supported by

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