Skip to content
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

Difference with python library #13

Open
dneykov opened this issue May 19, 2020 · 2 comments
Open

Difference with python library #13

dneykov opened this issue May 19, 2020 · 2 comments

Comments

@dneykov
Copy link

dneykov commented May 19, 2020

Hi,

great library but I notice difference compared to the python library. I also use it in nodjs and the result there are same as the python library but this is not the case in PHP.
This is the example result using python library

choices = ["ACOB751", "ACAB5861"]
process.extract("ACO8751", choices, scorer=fuzz.partial_ratio)
[('ACOB751', 86), ('ACAB5861', 53)]

And same example in PHP

$choices = ["ACOB751", "ACAB5861"];
$this->fuzzProcess->extract(
    $choices,
    "ACO8751",
    null,
    [$this->fuzz, 'partialRatio']
);
Collection {#1081
    -elements: array:2 [
        0 => array:2 [
            0 => "ACOB751"
            1 => 42
        ]
        1 => array:2 [
            0 => "ACAB5861"
            1 => 30
        ]
    ]
}

Any advice? Thanks.

@dneykov
Copy link
Author

dneykov commented May 19, 2020

Find out that tokenSortRatio give slightly closer values but still not same.

@GrozescuRares
Copy link

Same issue here. Did you managed to find a solution? The tokenSortRatio algorithm doesn't work for me.

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

No branches or pull requests

2 participants