1

My question is specific about Semantically Linked Data

Consider following

<resource>
      skos:label "Some Label"

A resource can have label which is semantically tagged.

I am trying to build data set where label/title contains citations, how can i represent that using skos:label or some similar vocabulary?

where

<resource>
   skos:label "Text " + <anotherresource1#text> <anotherresource2#text> .

<anoherresource1>
   :text "Hello" .

<anoherresource2>
   :text "World" .

such that the label essentially becomes "Text" + "Hello" + "World"

Zafar Ali
  • 37
  • 1
  • 8
  • not possible in RDF, you cannot use other values as part of a literal. What you could do is to add your own property with an RDF list, e.g. `ex:myLabelMadeOf ( )` - but even then, the application has to generate resp. render the label by fetching the data from the knolwedge base first and then concatenate it as well. – UninformedUser Dec 18 '20 at 07:04
  • This is what i thought of as well, thanks for confirming. But does it really not cut it as relations. because for the application on top its fine but if this dataset goes in public domain there should eb something to convey this relationship. and its not just titles in the text i am working with its all over the place. datasetOne resource1 title cites datasetTwo resource1 text or some other property – Zafar Ali Dec 18 '20 at 11:10

1 Answers1

1

I would argue that when you cite something, you want the text you cite to be actually present in your resource, since if someone else changes it, that could very well change the meaning of your original text.

There are two things to solve here – how to create a literal that differentiates between original and cited text, and how to link that to its source.

The range of skos:prefLabel seems to be the class of plain literals, so only strings and language-tagged strings should be there. rdfs:label however seems to be fine with any literal, so I'll go with that for the moment (rdfs:comment is however more suited for longer and more complex texts).

You'd also most likely want to expose the text in such a way that is still easy for tools to recognize and display. I'll go with HTML or XML here, since any tool that doesn't understand its meaning can simply strip the tags and just show the content.

I'll go with HTML here, since there is the <q> tag there intended for this purpose there. You might also want to specify the language of the fragment and remove the styles:

<http://example.org/resource>
   rdfs:label '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML .

This should be sufficient for both presenting the data and referring to other resources from it, but you might also want to have the inverse discoverable. I'll go with dcterms here:

<http://example.org/anotherresource1>
   dcterms:isReferencedBy '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML .

<http://example.org/anotherresource2>
   dcterms:isReferencedBy '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML .

As you can see, this quickly becomes impractical, but there is a way to combine it, with a little of OWL:

<http://example.org/resource>
   rdfs:label [
      owl:sameAs '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML ;
      dcterms:references <http://example.org/anotherresource1> ;
      dcterms:references <http://example.org/anotherresource2>
   ] .

This makes it possible to specify the label as identical to the original literal, yet also to talk about it in terms of other relations.

There is also another option if the tools don't understand owl:sameAs, albeit weaker:

<http://example.org/resource>
   rdfs:label '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML ;
   rdfs:label [
      dcterms:references <http://example.org/anotherresource1> ;
      dcterms:references <http://example.org/anotherresource2>
   ] .

This still specifies the label in a way that requires minimal effort to find what should be displayed, but it does not necessarily mean that we talk about a single label. This issue can be fixed with a little duplication:

<http://example.org/resource>
   rdfs:label '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML ;
   rdfs:label [
      owl:sameAs '<span lang="en">Text <q cite="http://example.org/anotherresource1" style="quotes:none">Hello</q> <q cite="http://example.org/anotherresource2" style="quotes:none">World</q></span>'^^rdf:HTML ;
      dcterms:references <http://example.org/anotherresource1> ;
      dcterms:references <http://example.org/anotherresource2>
   ] .

Both the first and third of the last three options presented seem equally valid to me, so you can choose whichever works the best with the tools you intend to browse your database.

IS4
  • 11,945
  • 2
  • 47
  • 86
  • Last option make more sense to me, not sure how to achieve that, with Jena, adding property to resource with array as object – Zafar Ali Dec 18 '20 at 17:17
  • @ZafarAli Not sure what you mean. It's not that the resource has an array of objects as `rdfs:label`, it means it links to two nodes that describe its label. There is no other array in my examples. – IS4 Dec 20 '20 at 19:17