-
Notifications
You must be signed in to change notification settings - Fork 13
Using Edit Distance to Word-Diff Across Multiple Lines #80
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
base: main
Are you sure you want to change the base?
Conversation
lib/WordDiff.ml
Outdated
| construct_pairs [] ys lcs ((None, Some y) :: acc) | ||
| | x :: xs, y :: ys, [] -> | ||
| construct_diff xs ys [] (Changed x :: acc_mine) (Changed y :: acc_their) | ||
| construct_pairs xs ys [] ((Some x, Some y) :: acc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pairing these lines is wrong!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, do you mind elaborating more on why it is wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try it on the following test!
- aaaaaaaaa a
- egdg xsd fi sdgfyu s gd csue c e yeg scy
+ aaaaaaaaa b
+ yugyu fft yu utf ytfutf uyg gygu yftuf gg uf ftThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LACS -> A sequence of lines
Here, we have two lines in 1 and two lines in 2.
So LCAS is a matter of lines. Here, it will be a length of 1, and the LCAS are (Some aaaaaaaaa a, Some aaaaaaaaa b)
So here, in the accumulator, I am adding x and y as being paired, when x and y are not part of the LACS.
Here, the example, x and y corresponds to egdg ... and yugyu ...
So they should not be paired.
- Fixed bugs in the pairing of lines
The LACS must consist of the _two_ subsequence
- Finished rendering paired lines
Co-authored-by: Alan Matthew <[email protected]>
6424540 to
a978092
Compare
No description provided.