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

Return facet list for each page #51

Open
5 of 11 tasks
anitacaron opened this issue Mar 23, 2023 · 6 comments
Open
5 of 11 tasks

Return facet list for each page #51

anitacaron opened this issue Mar 23, 2023 · 6 comments
Assignees

Comments

@anitacaron
Copy link
Collaborator

anitacaron commented Mar 23, 2023

The JSON result should have

{
"data": [{..}],
"pagination": {},
"facets": {
 "mapping_justification": [],
 "predicate_id": [],
 "mapping_provider": [],
 "object_source": [],
 "confidence": [],
 "mapping_set_title": []
}
}
  • "mapping_justification"
  • "predicate_id"
    • Return values as curie
  • "mapping_provider"
    • Return values as curie
  • "object_source"
    • Return values as curie
  • "confidence"
    • Return min and max values
  • "mapping_set_title"
@anitacaron
Copy link
Collaborator Author

The facets don't have a label for the UI. How to deal with it?

This is how it's returned:

"facets": {
    "mapping_justification": [
      "https://w3id.org/semapv/LogicalReasoning",
      "https://w3id.org/semapv/LexicalMatching"
    ],
    "predicate": [
      "http://www.w3.org/2004/02/skos/core#closeMatch",
      "http://www.w3.org/2004/02/skos/core#exactMatch"
    ],
    "mapping_provider": null,
    "object_source": null
  }

@matentzn
Copy link
Collaborator

One option is to have a SEMPAV endpoint embedded in the API. This would allow to do things like returning SEMAPV vocabulary metadata that could be displayed in tooltips in the likes.

@anitacaron
Copy link
Collaborator Author

Can you give a link to the SEMPAV endpoint? I couldn't find it.

@matentzn
Copy link
Collaborator

No no, there is no SEMAPV endpoint - only the vocabulary https://github.com/mapping-commons/semantic-mapping-vocabulary/blob/main/semapv.owl

Basically we have two options:

  1. We have the UI depend on OLS for obtaining labels for sempav, and make a semapv OLS endpoint mandatory when configuring the UI (this could be ok because we can simply link the public OLS endpoint for this purpose)
  2. We add a very basic /terminology endpoint to the SSSOM API to request labels and definitions for semapv / sssom vocabulary. Input: ID (CURIE), output: Label, Definition

I personally prefer the second because this is self contained, but you may want to check with @udp for which solution is advidable.

@anitacaron
Copy link
Collaborator Author

I looked into the vocabulary file semapv.owl, and it seems they have different IRIs used for the mapping_justification values.

The IRI I have when generating SSSOM:

https://w3id.org/semapv/LexicalMatching

The IRI in the semapv.owl file:

https://w3id.org/semapv/vocab/LexicalMatching

Which one is not up to date?

@matentzn
Copy link
Collaborator

matentzn commented Apr 4, 2023

https://w3id.org/semapv/vocab/LexicalMatching

Is correct.

I had already fixed that in bioregistry: https://bioregistry.io/registry/semapv

Made an issue in sssom py to fix this: mapping-commons/sssom-py#362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants