Zafar Ali
Zafar Ali

Reputation: 37

LinkedData links in text

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"

Upvotes: 1

Views: 69

Answers (1)

IS4
IS4

Reputation: 13197

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.

Upvotes: 1

Related Questions