ontodev / rdftab.rs

RDF Tables in Rust
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

`<`Angle brackets`>` around URIs #25

Closed joeflack4 closed 1 year ago

joeflack4 commented 1 year ago

Overview

This isn't a huge issue, but not addressing this in rdftab is propagating to a chain of other libraries / tools, e.g. semsql -> oaklib -> owl-on-fhir.

Expected behavior

A list of URIs, like:

http://omim.org/entry/1000070
...

Actual behavior

I can't remember if this happens 100% of the time or just sometimes, but I get:

<http://omim.org/entry/1000070>
...

Questions

  1. Is there any advantage / reason why the angle brackets appear?

Additional information

Related slack discussion in obo-community.

jamesaoverton commented 1 year ago

The design intention was to make a hard distinction between IRIs and CURIEs. Most IRIs that we see are URLs starting with "http(s)", but in the general case they can be almost any string. The code should favour CURIEs when a prefix is available, and IRIs when there's not applicable prefix.

joeflack4 commented 1 year ago

Agreed!

How about this? If there's indeed some utility in conditionally keeping then: a. we can still draw a hard distinction on a non-URL IRI and CURIEs by only including angle brackets when the IRI does not start with http.

joeflack4 commented 1 year ago

Here's another suggestion: b. Add a parameter to rdftab to activate the <angle brackets>, with a default set to either true or false.

jamesaoverton commented 1 year ago

These are both good suggestions, and I understand the reasoning behind them. Thank you for raising them.

When I was designing RDFTab I thought long and hard about carving out an exception for http(s), and in the end I decided against it. Now that it's out in the world, I'm very reluctant to reverse that decision.

If you have an RDFTab table with too many angle brackets, the best option is to add more prefixes.

Thanks again!