louisabraham / pydivsufsort

Python package for string algorithms ➰
MIT License
38 stars 4 forks source link

implement an index class #26

Closed louisabraham closed 4 years ago

louisabraham commented 4 years ago

It computes the suffix array, lcp array and segment tree lazily and allows to answer LCP and search queries. Furthermore, it can be easily serialized using pickle.

seanlaw commented 4 years ago

Does this mean that you be using Python’s @property decorator for this lazy computation?

louisabraham commented 4 years ago

property is just a syntactic sugar. memoization is the algorithm.

What about WonderString for the name of this class and the new repository name?

seanlaw commented 4 years ago

I think the issue with using the word “String” in the name is that it immediately makes people assume that it only works for strings (which is not my use case).

louisabraham commented 4 years ago

I think it's not a big problem as "string" refers more to a family of algorithms that can be used on arrays than to the str datatype. For example, the Wikipedia page of suffix arrays talks about strings.

seanlaw commented 4 years ago

I think that is fair assuming that we supply examples where integers can be used (which we have in the README).

I am curious why the “Wonder” part?

louisabraham commented 4 years ago

I like superheroes and I was not comfortable with the acronym SS. Also, a reference to a female superhero is not bad in the world of computer science where men are over represented.

seanlaw commented 4 years ago

Cool. I’m down for that

louisabraham commented 4 years ago

Done.