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.4.tar.gz
(5.9 kB
view details)
File details
Details for the file suffix-trees-0.2.4.4.tar.gz.
File metadata
- Download URL: suffix-trees-0.2.4.4.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea2b49f10a8e8dbe1f01a3cefaf6018a5b87c0a6164bcb95d127195c26bf6972
|
|
| MD5 |
c89df64f20ab56628f3e82bcb51e69fc
|
|
| BLAKE2b-256 |
5a28cfa658b5d5337d433e283ffd89006ea8e96648d9f0f41870f20177c15294
|