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

Some generic name validation is too strict #5930

Closed
seav opened this issue Feb 22, 2019 · 7 comments
Closed

Some generic name validation is too strict #5930

seav opened this issue Feb 22, 2019 · 7 comments
Labels
validation An issue with the validation or Q/A code
Milestone

Comments

@seav
Copy link

seav commented Feb 22, 2019

I have added the name "Bacolor Municipal Hall" to a feature tagged amenity=townhall and I get the following validation warning with a button inviting me to remove the name:

Town Hall has the generic name "Bacolor Municipal Hall"

But as you can see, the name is a proper proper name and is not a generic name.

@quincylvania
Copy link
Collaborator

@seav The generic name validation uses the discardNames regex list from filters.json in the name-suggestion-index project. It looks like it flags any name containing "municipal". We should probably change that to only flag exact matches.

Keep in mind that the generic name validation uses imperfect heuristics and you can ignore it! There are bars named "Bar" after all.

@quincylvania quincylvania added the validation An issue with the validation or Q/A code label Feb 22, 2019
@seav
Copy link
Author

seav commented Feb 23, 2019

Yup, I know that I can ignore the warnings similar to how I handle validation errors flagged by JOSM. But I am an experienced OSM mapper after all. I fear that newbie OSM mappers who use iD may think that what they are doing is wrong because of these too strict warnings.

@quincylvania
Copy link
Collaborator

quincylvania commented Feb 23, 2019

@seav I agree with you 100%. We should fix this case. I was just letting anyone who reads this thread know it's okay to ignore warnings 😅

@matkoniecz
Copy link
Contributor

matkoniecz commented Feb 24, 2019

The generic name validation uses the discardNames regex list from filters.json in the name-suggestion-index project

Is it importing filters or just copied them as a starting point? Because blindly importing them is a bad idea, their purpose is not to detect generic names but to discard all non-brand names.

Other cases that will happily generate false positives from a quick look: "Bank spółdzielczy" (matches "^bank(| spółdzielczy)$"), everything from "^(central|city|europa|grand|palace|park|royal)(\\s)?hotel$" rule, "okręgowa stacja kontroli pojazdów" (matches "^(okręgowa\\s)?stacja kontroli pojazdów$") and many other non-brand non-generic ones...

I would suggest to maintain them as a separate list - maybe with list of filters excluded as too zealous and adopted to make importing new ones easy.

@bhousel
Copy link
Member

bhousel commented Feb 26, 2019

Other cases that will happily generate false positives from a quick look: "Bank spółdzielczy" (matches "^bank(| spółdzielczy)$"), everything from "^(central|city|europa|grand|palace|park|royal)(\\s)?hotel$" rule, "okręgowa stacja kontroli pojazdów" (matches "^(okręgowa\\s)?stacja kontroli pojazdów$") and many other non-brand non-generic ones...

Yes, the filters.json list isn't really designed to be a name filter for iD, we are just using it for now.

We could create a separate list, but it might be faster and more useful to just tweak the filters.json list to move more of the specific names, like those hotels, from discardNames (which iD repurposes) to discardKeys.

@ignaciolep
Copy link

The same validation happened with "Municipalidad de Gonzales Chaves" in Buenos Aires, Argentina.
That's because the word "Municipalidad" (Town hall) contains the string "Municipal"?

a36130db-1fcf-49d6-a14c-0bb8dd61

bhousel added a commit to osmlab/name-suggestion-index that referenced this issue Mar 4, 2019
bhousel added a commit to osmlab/name-suggestion-index that referenced this issue Mar 4, 2019
Specific names should be in `discardKeys` not `discardNames`
(re: openstreetmap/iD#5930
@bhousel
Copy link
Member

bhousel commented Mar 4, 2019

but it might be faster and more useful to just tweak the filters.json list to move more of the specific names, like those hotels, from discardNames (which iD repurposes) to discardKeys.

☝️ I did this.. I'm going to close for now, but we can always adjust the filter some more if it turns out to still be too aggressive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation An issue with the validation or Q/A code
Projects
None yet
Development

No branches or pull requests

5 participants