culturecreates / artsdata-reconciliation

Artsdata Reconciliation Services.
0 stars 0 forks source link

Reconciliaton API - iteration 3 multi-language #13

Open saumier opened 3 months ago

saumier commented 3 months ago

See doc https://docs.google.com/document/d/10eiOqials4PDipSw3zhNYTw_UbE0W0SuUk7nIAbMHxM/edit#heading=h.qbm5wo48afoq

Test on Culture Creates github page: https://culturecreates.github.io/testbench/#/client/https%3A%2F%2F35.183.160.6%2Freconcile

Tasks

### Tasks
AbhishekPAnil commented 2 months ago

Here is the swagger link for artsdata testing with the latest draft version : https://35.183.160.6/api#/APIs/ReconciliationController_reconcileByQuery

saumier commented 2 months ago

@sahalali The test bench is getting an error. I think this needs to be fixed on the reconciliation server.

Screenshot 2024-07-06 at 12 50 21 PM

@AbhishekPAnil Please deploy to culturecreates github pages so it is easier to test. You can deploy to ghpages using >npm run build and then >npm run deploy but just make sure you are in culturecreates and not the official W3C repo.

AbhishekPAnil commented 2 months ago

@saumier The branch culturecreates:enhancement/issue-13 for test bench has been deployed. You can test it here : https://culturecreates.github.io/testbench/

saumier commented 2 months ago

@sahalali @AbhishekPAnil The endpoint error I experienced above is probably because we don't have an SSL certificate on the server, and you both have probably accepted the insecure connection in your browser. However, we should have an SSL certificate if we want others in the W3C reconciliation group to play around and expore the new endpoint. @sahalali Can you please add an SSL certificate?

Also, @sahalali Do you have an idea why the test bench is showing "Validations error for reconcilation response undefined must be object"

Screenshot 2024-07-08 at 10 18 29 AM
saumier commented 2 months ago

@AbhishekPAnil I'll open an issue in our culturecreates testbench repo and ask you to merge your work in to our main branch. https://github.com/culturecreates/testbench/issues/4

saumier commented 2 months ago

@sahalali While I am away, please continue to work on Iteration 3 to implement the use cases: Reconcile events with dates, Reconcile with additional properties (literals and URIs), Reconcile with external entity URI only (without needing to send a name). You may want to break these out into individual issues for tracking and testing.

sahalali commented 2 months ago

@saumier I'm not sure how to proceed with filtering by non-literal values. When creating the SPARQL query, we need to take into account the data type when creating the filter. For example, when using the filter(?startDate = "2025-11-28T20:00:00-05:00"^^xsd:dateTime"), the same consideration applies to other data types.

Proposal:

  1. Maintain a map of the property in the reconciliation service and convert the value to the corresponding data type. For instance, if the property is startDate or endDate and the value is 2025-11-28T20:00:00-05:00, then convert the value to xsd:dateTime and add it to the SPARQL query.
  2. Make the SPARQL query generic by accounting for any data type.

Reconcile with external entity URI only (without needing to send a name): I couldn't find an API endpoint in the documentation for this, but I added a new endpoint/resource/{id} for reconciliation by id. We should review this path.

Your advice on this matter would be greatly appreciated.

saumier commented 1 month ago

@sahalali I reviewed our doc on this and the use case "Reconcile with external entity URI only (without needing to send a name)" is about using a property like "schema:sameAs" with an ISNI URI or a CMS URI. I was mistaken that it was for the entity URI itself. So there is no question for me to ask the group because it is already clear that we should be able to pass a property "schema:sameAs" and a URI "http://lod.footlight.io/resouce/123" without a "name" and it should reconcile. Do you agree?

Regarding using the ID as the name, the reconciliation spec section 4.4 says:

It is also expected that reconciliation queries .. supplying an entity identifier as query should return the corresponding entity as a candidate, with a high score.

The Wikidata reconciliation service works with both Q16 and http://www.wikidata.org/entity/Q16 to return the corresponding entity as a candidate. I think we should do the same?

sahalali commented 1 month ago

@saumier When reconciling with existing implementations, it is necessary to include the name in order to produce a result. I attempted to use Wikidata for this purpose. Please let me know if I am mistaken. Although the name is not designated as a mandatory field, no result will be generated if the name is included.

Image

Image

saumier commented 1 month ago

@sahalali Is there still a question here? I am not sure why it is assigned to me. Let me know if it is ready to test. Thx.

sahalali commented 1 month ago

Please review this.

saumier commented 5 days ago

@sahalali The Reconciliation test bench at culturecreates is not working with this endpoint https://culturecreates.github.io/testbench/#/client/https%3A%2F%2F35.183.160.6%2Freconcile

saumier commented 5 days ago

@sahalali After you restarted the database the reconciliation service worked for a little while but then stopped again before I could make the demo. I only did a couple requests so I don't think there was any stress put on the server.

Please investigate as to why the server seems to stop working.