Skip to content

ChapmanMeanLength returns nearly the same value #5

Open

Description

@David-Maisonave

ChapmanMeanLength always returns 9.xx regardless of the inputs.
Here's the result when comparing "David" to the following associated strings:

David	9.223682
Dave	9.299208
Davdi	9.223682
Dadiv	9.223682
david	9.223682
Dovid	9.223682
Divad	9.223682
divaD	9.223682
Daves	9.223682
Maday	9.223682
xxxxx	9.223682
12345	9.223682
Dav id	9.148616
Da.v.id	9.07401
D-avid	9.148616

The first row should have a zero distance, but it returns a values which is the same to strings "xxxxx" and "12345".
I looked at the source code, and I don't see how this class could perform string comparisons.
Is this an incomplete class?

Activity

  1. self-assigned this
    on Aug 19, 2025
  2. StefH commented on Aug 19, 2025

    @StefH
    Owner

    When I read the "description" from ChapmanMeanLength it seems that is not implemented as we would think.

    I did ask ChatGPT for an implemenation, and I'll add this as ChapmanMeanLengthTrue class.

  3. David-Maisonave commented on Aug 20, 2025

    @David-Maisonave
    Author

    I get the sense that ChapmanMeanLength is not really a string matching algorithms. But it's true purpose is not clear to me.

    FYI:
    I'm using slightly modified version of the SimMetrics code in my own project.
    SqliteFuzzyPlusExtension.

    Most of the algorithms work great. ChapmanMeanLength is the only one I had issues with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions