Preprocess string for efficient search

I have a fixed string S size n on which I make a lot of subscript requests. One way to optimize this situation is to pre-process the string and build a suffix tree or suffix array. After preprocessing, substring requests can be optimally performed 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 create a suffix tree or suffix array?

+1
source share
1 answer

I believe that the emsre python package provides exactly what you are looking for.

+3
source

Source: https://habr.com/ru/post/1399878/


All Articles