Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Comparing lists rather than strings? #163

Open
cjmcmurtrie opened this issue May 24, 2017 · 0 comments
Open

Comparing lists rather than strings? #163

cjmcmurtrie opened this issue May 24, 2017 · 0 comments

Comments

@cjmcmurtrie
Copy link

cjmcmurtrie commented May 24, 2017

Great library!

It would be very nice to be able to compare lists (for instance token lists) rather than per-character comparisons. For instance if a token is a unit of text rather than a character,

ratio('i tried', 'he is trying')

Should be zero, as there is no way to equalize them by token replacement.

difflib.SequenceMatcher(None, 'i tried'.split(), 'he is trying'.split()) return zero when splitting the strings to tokens.

I dug around and found some intimidating c code in the back-end of Levenshtein. Have you been asked this before?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant