stanfordnlp / string2string

String-to-String Algorithms for Natural Language Processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return indices for local alignment

realfolkcode opened this issue · comments

Hello! Thank you for this library! It works like a charm for many string and sequence problems.

However, when using the Smith-Waterman algorithm for local alignment, I noticed that there is no option to see where the substrings start and end in the original strings. Currently, my solution is to inherit from SmithWaterman class and override both the backtrack and get_alignment methods to store the start and end indices from the score matrix. If you are interested, I could make a PR that implements this feature.