Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tstadel opened this issue Jun 24, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@tstadel
Copy link

tstadel commented Jun 24, 2022

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?

@tstadel tstadel changed the title dest_start and dest_end of partial_ratio_alignment's can be negative since 2.0.14 dest_start and dest_end of partial_ratio_alignment's result can be negative since 2.0.14 Jun 24, 2022
@maxbachmann maxbachmann added the bug Something isn't working label Jun 24, 2022
@maxbachmann
Copy link
Member

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

@tstadel
Copy link
Author

tstadel commented Jun 24, 2022

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

@tstadel
Copy link
Author

tstadel commented Jun 24, 2022

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

@tstadel tstadel closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants