Suggest property request always includes a type

I am creating a new reconciliation service and found unexpected behaviour with the suggest/property/ queries that the OpenRefine interface sends. Though I’m using the Wikidata service in this example so it can be replicated.

If I select Reconcile against no particular type and then start typing in a property, OpenRefine sends the reconciliation service the following request, where it includes the most recently selected type even though I unselected type before typing in the property box.

https://wikidata.reconci.link/en/suggest/property?prefix=test&spell=always&exact=false&scoring=schema&prefixed=true&type=Q223393

This affects our service’s ability to only return property suggestions given the selected type, because it won’t display all relevant properties when no type is selected.

Hi @Natalie_H and welcome to the forum!

First, it’s very exciting that you are creating a new reconciliation service! I would be curious to know for which data source it will be.

The way OpenRefine queries property suggest services in this dialog is not exactly following the specification: it would be good to align the two. A lot of the parameters it passes in its queries are not mentioned by the specs, so we should either remove them from OpenRefine, or add them to the specs if they are actually useful.

In particular, this type parameter is not specified at all by the specs. I can see it makes sense though, so it probably does not hurt to add it. Because the specs are edited by another group (that you are most invited to join!), we need to suggest that either on the public-reconciliation@w3.org mailing list or the issue tracker for the specs. We could also open an issue on OpenRefine’s side about aligning with the specs (removing parameters that are not specified) and about fixing this particular case when no type is specified (assuming we indeed keep the type parameter in the specs).

Sorry if it feels a bit convoluted - the goal of having the spec defined outside of the OpenRefine project is to encourage other clients to adopt it as well (and it’s already happening, yay!). I would also be happy to open the issues in the right places if you prefer.

If I select Reconcile against no particular type and then start typing in a property, OpenRefine sends the reconciliation service the following request, where it includes the most recently selected type even though I unselected type before typing in the property box.

As described, that sounds like a bug. I’d suggest creating an issue in the bug tracker. It’s probably straightforward to fix.

Tom

Thank you both!

I work for the LINCS project (https://lincsproject.ca/), and we are creating a large knowledge graph primarily of Canadian humanities and cultural heritage data. That is what our new reconciliation service will connect to. We are following the W3 spec with the intention that our service can be used by OpenRefine users and be called on from some other data exploration tools that we are working on.

I’ll create the bug report as @tfmorris suggested. But @antonin_d if you could create the issues for that larger conversation of aligning the OpenRefine query with the W3 spec that would great.

I personally like the option to specify the type constraint in the suggest property query, but ultimately we will follow the spec that is decided on.

Thanks a lot! I have created an issue on the specs repository as well. It should be straightforward to fix there as well. Thanks again for reporting this and all the best for your recon service!