Modify

Opened 7 years ago

Last modified 3 days 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)

15217.patch (69.5 KB ) - added by taylor.smock 22 months ago.
Add autofill support based off of other presets

Download all attachments as: .zip

Change History (16)

comment:1 by stoecker, 7 years ago

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.

comment:2 by kocio, 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).

Last edited 7 years ago by kocio (previous) (diff)

comment:3 by mkoniecz, 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 kocio, 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:5 by bastiK, 7 years ago

The plan is to wait for someone to implement this feature.

comment:6 by maxerickson@…, 6 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 mkoniecz, 6 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 maxerickson@…, 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 1ec5, 6 years ago

Cc: 1ec5 added

comment:10 by Don-vip, 5 years ago

Keywords: name brand added

comment:11 by aharvey, 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 aharvey, 5 years ago

Cc: aharvey added

comment:13 by JayTurnr, 3 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

by taylor.smock, 22 months ago

Attachment: 15217.patch added

Add autofill support based off of other presets

comment:14 by taylor.smock, 22 months ago

Cc: simonpoole 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 for preset_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).
  • Adds a subclass of AutoCompletionItem that also implements Runnable. 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 no wikipedia/wikidata/brand:wikidata tags until those are added to the relevant presets).
  • Some performance optimizations (example: Key overrides matches to avoid many new singletonList 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 uses name (and other name key variants) along with brand 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, set expert.tagging.preset.children.from.heuristics accordingly. This should probably be removed prior to merge.
  • No tests (yet)

comment:15 by mnalis, 3 days ago

Cc: mnalis added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mkoniecz.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.