Re: RDF lists/arrays and n-ary relations [was Re: OWL and RDF lists]

Sorry if the naming was confusing, I tend to use list/array interchangeably
(in Swift they're arrays, in Dart they're lists, they're the same though,
both indexable). rdf:List I tend to think of as a "linked list".

In any case though, don't we already have rdfs:ContainerMembershipProperty
if we need to access by index?:

  :Paper1 :authorList :Paper1Authors
  :Paper1Authors rdf:_1 :Alice
  :Paper1Authors rdf:_2 :Bob
  :Paper1Authors rdf:_3 :Charlie

And something a bit out there and with potential to break things: allowing
literals in the predicate position. Whenever in that position they'd be
read as an array index:

  :Paper1 :authorList :Paper1Authors
  :Paper1Authors "1"^^xs:integer :Alice
  :Paper1Authors "2"^^xs:integer :Bob
  :Paper1Authors "3"^^xs:integer :Charlie

Anthony

On Fri, Sep 23, 2022 at 9:58 PM Hugh Glaser <hugh@glasers.org> wrote:

> Thanks, David :-)
>
> Yes, it is definitely more than an array.
> Any suggestions for a name?
> Having a good name for a thing can be very helpful in focussing
> discussion, now and in the future.
>
> It’s sort of like a “half-ladder” to me, in terms of a data structure
> (which it isn’t, of course).
> Maybe there is a name that captures this sort of knowledge pattern?
>
> > On 23 Sep 2022, at 14:20, David Booth <david@dbooth.org> wrote:
> >
> >
> > On 9/23/22 07:16, Hugh Glaser wrote:
> > > I don't think talking about "lists" at all is a good term.
> >
> > Fully agree.  We need arrays, not lists.
> >
> > > . . .
> > > For ordered lists, Dan Brickley made a suggestion some time ago
> > > (on a github issue that I can't find right now, unfortunately):
> > > they could be encoded using RDF-star, like that:
> > >
> > >>    # Example 10 expanded
> > >>    <#paper1> schema:creator
> > >>        <#alice> {| ex:order 1 |},
> > >>        <#bob> {| ex:order 2 |},
> > >>        <#charlie> {| ex:order 3, ex:last |}.
> > >>
> > > It has the advantage of keeping the "simple" triple for each
> > > creator, and is quite easy to query in SPARQL.
> >
> > Yes, but note that that example is *different* from the basic use
> > of an array, because it asserts the schema:creator relation on
> > every element of the array -- not on the array as a whole.
> > It is like applying a "map" operator to an array of
> > people, in order to assert them all as schema:creators.
> >
> > On 9/23/22 00:21, Anthony Moretti wrote:
> > > all the proposals are for syntactic sugar, but please
> > > ignore them, it's clear I haven't considered things well
> > > enough. Apologies for any time wasted.
> >
> > Not wasted!  They were useful contributions to the conversation.  Please
> > continue to contribute.  We are collectively figuring this stuff out as
> > we go along, and the process benefits from diverse perspectives and
> ideas.
> >
> > Thanks,
> > David Booth
> >
>
>
>

Received on Friday, 23 September 2022 15:39:23 UTC