Opened 7 years ago
Last modified 6 months ago
#15217 new enhancement
[PATCH][RFC] Use name-suggestion-index
Reported by: | mkoniecz | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report name brand | Cc: | 1ec5, aharvey, simonpoole, mnalis |
Description
name-suggestion-index [1] is a list of commonly used name values for suggesting correct spelling of name tags. It can also help automatically suggesting the correct shop tag given the name.
It has been already implemented in iD [2] and Vespucci [3].
Would it be an idea to implement this in JOSM as well? I can imagine it would take quite some coding to do this, but I think it would be really useful if implemented. Inconsistent shop names are a common problem, and hard to correct [4].
[1] https://github.com/osmlab/name-suggestion-index
[2] https://www.mapbox.com/blog/common-names-in-id/
[3] http://vespucci.io/tutorials/name_suggestions/
[4] https://wiki.openstreetmap.org/wiki/Mechanical_Edits/Math1985/UK_Shop_Names
Note that it is a resurrection of https://josm.openstreetmap.de/ticket/10752
10752 was closed three years ago as wontfix for reasons that seems to be fixed from looking at https://github.com/osmlab/name-suggestion-index/blob/master/canonical.json and https://github.com/osmlab/name-suggestion-index/blob/master/filter.json
Attachments (1)
Change History (16)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Even if there are generics, but the names are consistent, it's easier to find them and fix later. And it's not easy to tell if the name is generic or not (if there's a banner above the doors it may be both).
comment:3 by , 7 years ago
"but I still find many generics in the lists, especially when it comes to non-latin names" can you maybe give examples? Either here or as an issues at https://github.com/osmlab/name-suggestion-index/issues ?
Even if it will not be used in JOSM fixing this issues will improve quality of data from iD where this data is already used.
comment:4 by , 7 years ago
Are there additional questions or plans about this ticket? I'm interested to have this functionality in JOSM, because it's my editor of choice.
comment:6 by , 7 years ago
The half measure of creating a preset for each suggestion (available as name-suggestions.presets.xml in the name suggestion repo already) at least makes the names available in the F3 search and for autocomplete.
I've hesitated to add the file to the preset list on the wiki because it uses the one click style presets.
comment:7 by , 7 years ago
I've hesitated to add the file to the preset list on the wiki because it uses the one click style presets.
Why it is a bad thing?
comment:8 by , 6 years ago
With the one click style presets there is little indication that the tags have been changed. A dialog gives the chance to preview the new tags and cancel and so on.
comment:9 by , 6 years ago
Cc: | added |
---|
comment:10 by , 5 years ago
Keywords: | name brand added |
---|
comment:11 by , 5 years ago
It would be nice if JOSM could do suggested tag updates based on the name-suggestion-index like how iD, especially for brand and brand:wikdata tags. I prefer to use JOSM, but the brand suggested tag updates is something iD does well.
I think a UI similar to the conflicts UI where you can see the suggested changes and approve or ignore specific tags.
comment:12 by , 5 years ago
Cc: | added |
---|
comment:13 by , 4 years ago
My biggest issue with the NSI-preset list is that it's very spammy and occupies most of the list when using preset search. I'm looking at seeing what can be done but Java is new to me
comment:14 by , 2 years ago
Cc: | added |
---|---|
Summary: | Use name-suggestion-index → [PATCH][RFC] Use name-suggestion-index |
Notes on attachment:15217.patch:
- Adds most of Vespucci's custom extensions to the JOSM xsd (not used or filled in anywhere yet -- @simonpoole should probably check and make certain that I understood the http://vespucci.io/tutorials/presets/#extensions page properly)
- Adds a
parent
boolean attribute forpreset_link
elements (might be removed if perf hit for heuristics is fixed, also in the preset xsd)- In order for the
parent
boolean attribute to work, the linked preset must follow the URI pattern specified in comment:9:ticket:12716 (from @simonpoole).
- In order for the
- Adds a subclass of
AutoCompletionItem
that also implementsRunnable
. This is what is called to fill in fields. - Adds a field and methods to use/populate that field to
TaggingPresetItemGuiSupport
which is used by the runnable to fill in fields. This does not add/fill in tags that are not in the parent preset (so nowikipedia
/wikidata
/brand:wikidata
tags until those are added to the relevant presets). - Some performance optimizations (example:
Key
overridesmatches
to avoid many newsingletonList
calls) - Initial work on preferring items that are autofillable (does not yet work for my current test case, McDonald's)
- For testing, there is heuristics to autocreate
preset_link
fields. This takes awhile (2+ minutes), so is done in the background. The heuristics usesname
(and othername
key variants) along withbrand
as the "primary" keys. There is a notification that briefly appears to tell the user that autofill is now available. To switch the heuristics on/off, setexpert.tagging.preset.children.from.heuristics
accordingly. This should probably be removed prior to merge. - No tests (yet)
comment:15 by , 6 months ago
Cc: | added |
---|
Situation got better compared to 3 years ago, but I still find many generics in the lists, especially when it comes to non-latin names.
But as suggestion it may now have a value.