Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Diffs recognizing less similarity since 4.10 #129

Closed
Assignees
wumpz
@stnagel

Description

@stnagel

Since version 4.10 of the library, diffs are recognizing less similarity between texts.

In the attached program, under version 4.9, the library correctly recognizes that there is only a 5-character difference between the texts (3 letters + 2 whitespace characters). Under version 4.10, the library reports that a large block of identical text has been deleted and then added.

TestCase.txt

4.9 output:

   1 EQUAL    apple1                                                                           apple1                                                                             2 EQUAL    apple2                                                                           apple2                                                                             3 EQUAL    apple3                                                                           apple3                                                                             4 CHANGE   A man named Frankenstein==oldCHANGE==> abc <==old==to Switzerland for cookies!   A man named Frankenstein                                                           5 CHANGE                                                                                    ==newCHANGE==>xyz<==new==                                                          6 CHANGE                                                                                    to Switzerland for cookies!                                                        7 EQUAL    banana1                                                                          banana1                                                                            8 EQUAL    banana2                                                                          banana2                                                                            9 EQUAL    banana3                                                                          banana3

4.10 output:

   1 EQUAL    apple1                                                                           apple1                                                                             2 EQUAL    apple2                                                                           apple2                                                                             3 EQUAL    apple3                                                                           apple3                                                                             4 CHANGE   A man named Frankenstein==oldDELETE==> abc to Switzerland for cookies!<==old==   A man named Frankenstein                                                           5 INSERT                                                                                    ==newINSERT==>xyz<==new==                                                          6 INSERT                                                                                    ==newINSERT==>to Switzerland for cookies!<==new==                                  7 EQUAL    banana1                                                                          banana1                                                                            8 EQUAL    banana2                                                                          banana2                                                                            9 EQUAL    banana3                                                                          banana3

Admittedly, there are aspects of the 4.10 output that are improved over the 4.9 output. For example, the fact that line 6 of the 4.9 output is indicated as a CHANGE, but there is no oldLine text and no changes in the newLine text can be confusing. However, the sacrifice in accuracy in 4.10 is far less desirable. In 4.9, the line 6 difference is indeed a change, but it's almost like a new tag is needed to indicate a group (?) change to make it clear that the change is a continuation of the line 4 difference.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp