Minimal implementation for constructing a suffix array
Project description
tinysa is a minimal implementation for constructing a suffix array.
Quick Start
To install tinysa, run this command in your terminal:
$ pip install tinysa
Using tinysa, you can construct a suffix array as follows:
from tinysa.tinysa import TinySA
suffix_array = TinySA()
suffix_array.index('banana')
Then, you can find a suffix that begins with a substring as follows:
position = suffix_array.search('ana')
print(position) # => 1
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
tinysa-0.2.2.tar.gz
(8.2 kB
view hashes)