diff-match-patch
diff-match-patch copied to clipboard
Diffing sequence of tokens instead sequence of characters
I need to diff a sequence of tokens instead of a sequence of characters. Is there a solution for it? So basically every token is either a sequence of characters, or some object, it doesn't matter, as long as you can compare two tokens and say if they are equal or not.
So I need the same solution of diff-match-patch, but a more generalized one: instead of restricting the algorithm to work on a sequence of characters, to work on a sequence of any kind of (comparable) objects.
Is the python difflib
library as efficient as diff-match-patch?