W3C home > Mailing lists > Public > semantic-web@w3.org > June 2021

Lists of tagged strings in RDF

From: Rumph, Frens Jan <mail@frensjan.nl>
Date: Wed, 9 Jun 2021 15:16:27 +0200
Message-ID: <CAH3f1B_GySMc6OJqiAzZh1-psykHHKFfR3d_5MnOA4Cb2xRQoQ@mail.gmail.com>
To: semantic-web@w3.org
Dear readers,

I am investigating transitioning an application to use RDF. One roadblock
is how this application models names of persons. It supports
straight-forward full names as a single string, but also supports
decomposed names, e.g. person X has given name *Frens* followed by a second
given name *Jan* followed by the family name *Rumph*.

Note that this is a crosspost of
https://stackoverflow.com/questions/65982459/rdf-modelling-of-list-of-name-elements.
I hope to get some more

The data structure is something like:

```java
enum Role {
   ...
   GIVEN_NAME,
   FAMILY_NAME,
   ...
}

record NameElement(role: Role, value: String) {}

record AnnotatedName(NameElement... elements) {}
```

in order to be instantiated like:

```java
var name = new AnnotatedName(
    new NameElement(GIVEN_NAME, "Frens"),
    new NameElement(GIVEN_NAME, "Jan"),
    new NameElement(FAMILY_NAME, "de Vries")
);
```

This allows reconstruction of the name into a string while at the same time
expressing the components of the name. So it captures the roles of the
elements of a name (e.g. given names, family names) *as well as* their
order (given names aren't first everywhere). Also, it allows expressing
multiple names. E.g. in multiple languages / scripts. Or even aliases used
in different areas of the world.

I have toyed around with some RDF constructs, but none are really
satisfactory:

```turtle
# list of strings misusing data types as tags
:frens :name ( "Frens"^^:givenName "Jan"^^:givenName "de
Vries"^^:familyName ) .

# list of blank nodes
:frens :name ( [ :givenName "Frens" ]
               [ :givenName "Jan" ]
               [ :familyName "de Vries" ] ) .

# single blank node with unordered 'elements'
:frens :name [ a           :AnnotatedPersonName ;
               :fullName   "Frens Jan de Vries" ;
               :givenName  "Frens" ;
               :givenName  "Jan" ;
               :familyName "de Vries" ] .
```

---

**Existing ontologies for HD names?**
Is there an existing ontology that covers such 'high fidelity'? FOAF and
vcard have some relevant properties, but aren't able to capture this level
of semantics.

**Lists?** One major 'blocker' in migrating this approach to RDF is the
notion of order that is used. If at all possible, I'd like to stay away
from the List / Container swamp in RDF land ...

I'd be grateful for any thoughts on the matter!

Best regards,
Frens Jan
Received on Thursday, 10 June 2021 09:59:53 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:46:09 UTC