I have a fixed string S of size n on which I make a lot of substring queries. One way to optimise for this situation is to preprocess the string and build a suffix tree, or suffix array. After preprocessing, substring queries can be performed optimally on S.
Is there an easy way, in Python, to preprocess strings "out of the box", without having to manually write all the code to build a suffix tree or suffix array?