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)
File details
Details for the file suffix-trees-0.2.4.3.tar.gz.
File metadata
- Download URL: suffix-trees-0.2.4.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23cb3c23997841bbaacd8d9fe0a3b1d1d885e6c7ce10ce353ebb5449822fe1b3
|
|
| MD5 |
43278e1adeee2b1de25cc1a9b9b46bda
|
|
| BLAKE2b-256 |
7b568baac33023351dd5988c616ccd9a3b885f16a3ebf6c636f8543d5e3661b1
|