rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics

Home Page:https://rapidfuzz.github.io/RapidFuzz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`dest_start` and `dest_end` of `partial_ratio_alignment`'s result can be negative since 2.0.14

tstadel opened this issue · comments

Since version 2.0.14 dest_start and dest_end of partial_ratio_alignment's return value can be negative. Before these values were 0. Is this intended behavior or a bug?

This is not intended. Do you have an example, where this occurs?

Sample code to reproduce:

text_a = 'er merkantilismus förderte handel und verkehr mit teils marktkonformen, teils dirigistischen maßnahmen.'
text_b = 'ils marktkonformen, teils dirigistischen maßnahmen. an der schwelle zum 19. jahrhundert entstand ein neu'
score_alignment = fuzz.partial_ratio_alignment(text_a, text_b)
print(score_alignment.dest_start) # -52

Thanks for the quick...eee "rapid" fix :-)