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

improved string normalization for deduplication #1370

Merged
merged 2 commits into from
Mar 14, 2021

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Oct 9, 2019

this PR improves the normalization function used for deduplication:

  • remove diacritics
  • improve test coverage

@missinglink
Copy link
Member Author

I staged this to take a look and there were three notable changes:

Aggregate test results
Pass: 610
Improvements: 1
Fail: 115
Placeholders: 0
Regressions: 2
Took 114607ms
Test success rate 99.72%

I had a look and it seems as though they are actually positive but marked as failing due to brittle test cases.

General Placeholder requests
  ✘ regression [17] "{"text":"Schöneberg, DE"}": score 2 out of 3
  diff:
    gid
      expected: whosonfirst:locality:101907543
      actual:   whosonfirst:locality:1126037037

search city/country
 ✔ improvement [15] "{"text":"Akmenė, lithuania"}"

Who's on First regions
  ✘ regression [8] "{"text":"Xaçmaz, Azerbaijan","sources":"wof"}": score 3 out of 5
  diff:
    layer
      expected: region
      actual:   locality
    name
      expected: Xacmaz
      actual:   Xaçmaz

@orangejulius
Copy link
Member

Looks good to me, is there anything else to do here before merging?

Copy link
Member

@Joxit Joxit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/unit/helper/diffPlaces.js Outdated Show resolved Hide resolved
test/unit/helper/diffPlaces.js Outdated Show resolved Hide resolved
@missinglink
Copy link
Member Author

missinglink commented Nov 14, 2019

I fixed some test issues and also now use our fancy new unicode.normalize() method to fix any potential unicode issues 🎉

This is good to merge once the failing test cases I mentioned above have been investigated.

@missinglink
Copy link
Member Author

force pushed to rebase origin/master

@missinglink
Copy link
Member Author

before

Aggregate test results
Pass: 615
Improvements: 10
Fail: 123

after

Aggregate test results
Pass: 645
Improvements: 5
Fail: 128

There is one notable test failure but I switched to dev->api to the same hash as prod and it's there too, so it's not the fault of this work 👍

search focus.point
  ✘ regression [1] "/v1/search?focus.point.lat=42.64&focus.point.lon=-84.7&text=10010": score 3 out of 4
  diff:
    priorityThresh is 1 but found at position 2

https://pelias.github.io/compare/#/v1/search?text=10010

@missinglink
Copy link
Member Author

The three failing test cases mentioned in the previous comment are no longer failing.

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

Successfully merging this pull request may close these issues.

3 participants