W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > April 2013

Re: agenda+ referencing ontology (Re: ISSUE-119: ITS RDF Ontology creation [MLW-LT Standard Draft])

From: Sebastian Hellmann <hellmann@informatik.uni-leipzig.de>
Date: Thu, 18 Apr 2013 23:41:44 +0200
Message-ID: <51706898.7080709@informatik.uni-leipzig.de>
To: Dave Lewis <dave.lewis@cs.tcd.ie>
CC: public-multilingualweb-lt@w3.org, rob brennan <rob.brennan@cs.tcd.ie>
Hi Dave,
OWL works quite funny, but a little bit unintuitive. Let's see an 
example based on http://xmlns.com/foaf/spec/#term_homepage
*Note* I attached a small list of changes, which should be made at the 
end, please don't overlook ;)
Another small note: "rdfs:property" -> "rdf:Property"

In the example, we will always consider the following triple, which you 
can find on http://dbpedia.org/resource/Angela_Merkel , but exchange the 
schema.
The triple is:

<http://dbpedia.org/resource/Angela_Merkel> foaf:homepage <http://www.bundeskanzlerin.de/Webs/BK/EN/> .


1. With xsd:anyURI in the schema:

foaf:homepage rdf:type rdf:Property ;
     rdfs:range xsd:anyURI .

The triple would say, that Angela's homepage is a 41 character long URI:

<http://dbpedia.org/resource/Angela_Merkel> foaf:homepage "http://www.bundeskanzlerin.de/Webs/BK/EN/" .

I am absolutely not sure how datatypes are validated by parsers and how 
parser will react to malformed URIs . Not sure, if they enforce 
anything.  I have also never seen this variant anywhere in use.

inferred triples:

# none



2. With rdfs:Resource:

foaf:homepage rdf:type rdf:Property ;
     rdfs:range rdfs:Resource  .

The object *must* be valid URI according to the RDF spec and also

The class resource, everything.

according to http://www.w3.org/2000/01/rdf-schema#Resource
Also you should use <> again:

<http://dbpedia.org/resource/Angela_Merkel> foaf:homepage <http://www.bundeskanzlerin.de/Webs/BK/EN/> .


3.  with owl:ObjectProperty:

foaf:homepage rdf:type owl:ObjectProperty .

Also the object *must* be  a valid URI, otherwise the parser will give a 
warning.
Being an ObjectProperty *implies* that 
<http://www.bundeskanzlerin.de/Webs/BK/EN/> is an owl:Thing , which is 
"The class of OWL individuals.", a rather technical definition. This 
could be anything, including a web site or homepage. Not that this is 
not a *requirement*, but it will be *inferred*, if needed.

Inferred:

<http://www.bundeskanzlerin.de/Webs/BK/EN/>  rdf:type owl:Thing .


4. Full definition from http://xmlns.com/foaf/0.1/homepage

<rdf:Property rdf:about="http://xmlns.com/foaf/0.1/homepage"
vs:term_status="stable" rdfs:label="homepage" rdfs:comment="A homepage
for some thing.">
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
     <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/page"/>
     <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/isPrimaryTopicOf"/>
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
     <!--  previously: rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Agent" -->
     <rdfs:domain rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
     <rdfs:range rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
   </rdf:Property>


implicit triples expanded:

## by rdfs:domain (actually redundant, b)
<http://dbpedia.org/resource/Angela_Merkel> rdf:type owl:Thing .
# previously (old rdf:sdomain)
# <http://dbpedia.org/resource/Angela_Merkel> rdf:type foaf:Agent .

## by rdfs:range
<http://www.bundeskanzlerin.de/Webs/BK/EN/> rdf:type owl:Thing .
<http://www.bundeskanzlerin.de/Webs/BK/EN/> rdf:type foaf:Document .

## by superproperties:
<http://dbpedia.org/resource/Angela_Merkel> foaf:page <http://www.bundeskanzlerin.de/Webs/BK/EN/> .
<http://dbpedia.org/resource/Angela_Merkel> foaf:isPrimaryTopicOf <http://www.bundeskanzlerin.de/Webs/BK/EN/> .

### some more are omitted


This goes very much down to the basics and I really hope that I got 
everything correct.


Some notes, which hopefully do not get overead

1. taClassRef should be an annotation property
There is one more small change, which I also used for some of the NIF 
properties and was requested by Stanbol.

<http://www.w3.org/2005/11/its/rdf#taClassRef> rdf:type owl:AnnotationProperty .

Whenever the Object is supposed to be an owl:Class, it can not per 
definition be an owl:Thing . Making taClassRef an AnnotationProperty 
makes all reasoners ignore it and nothing will be inferred.

2. Actually, you might want to consider to add rdfs:label and 
rdfs:comment and to add language tags to  "comments"@en and translate 
them to several language. (this is fine tuning however)
3. other ontologies use rdfs:isDefinedBy , I find this rather strange 
with ontologies that use the  '#'
<http://www.w3.org/2002/07/owl#AllDifferent> rdfs:isDefinedBy 
<http://www.w3.org/2002/07/owl#> .
It is kind of self-explanatory.

All the best,
Sebastian





Am 17.04.2013 17:14, schrieb Dave Lewis:
> Felix, Sebastian,
>
> I'm not sure I follow the reasoning behind this change. I've tried to 
> outline my concerns below so it would be great if you could clarify 
> this for us.
>
> If we assume that any instances following this ontology originally are 
> converted from an XML or HTML file with ITS annotation, then there is 
> no guarantee that the URIs point to an OWL instance - we don't make 
> any such restrictions in the spec. They could just point to a web page 
> or a UUID or what ever else makes sense in the context of the original 
> file.
>
> My understanding of owl:ObjectProperty however is that it must point 
> to an OWL instance, i.e. something that is an instance of an 
> owl:Thing, so using the ontology declaration:
>
> itsrdf:taAnnotatorsRef
>     a owl:ObjectProperty .
>
> would not actually be true in valid ITS cases where the URI referred 
> to a resource that is not an OWL instance.
>
> That was my motivation for specifying this as just:
> :taAnnotatorsRef rdf:type rdfs:property;
>      rdfs:range xsd:anyURI .
> since it doesn't preclude either of the owl:DatatypeProperty or the 
> owl:ObjectProperty options. I see this as necessary since we won't 
> know which one is appropriate without actually de-referencing the URI. 
> Perhaps such a check could be a final optional step in the ITS-NIF 
> mapping - but its more of an optimisation I think?
>
> cheers,
> Dave
>
>
>
>
>
>
>
>
>
> On 17/04/2013 14:22, Felix Sasaki wrote:
>> Thanks, Sebastian. Is now updated at
>> http://www.w3.org/2005/11/its/rdf-content/its-rdf.rdf
>> Dave, can you check whether this is ok, and if yes, update
>> http://www.w3.org/International/multilingualweb/lt/wiki/ITS-RDF_mapping
>>
>> Thanks,
>>
>> Felix
>>
>> Am 17.04.13 14:54, schrieb Sebastian Hellmann:
>>> Hi Felix,
>>> I had another look at the new version. There is a small, but 
>>> important difference between DatatypeProperties and xsd:anyURI, see 
>>> here: 
>>> http://lists.w3.org/Archives/Public/semantic-web/2010Jul/0395.html 
>>> (see Axel Polleres answer)
>>>
>>> In your case however you want to refer to the the rdf:resources, so 
>>> anything with xsd:anyURI should be owl:ObjectProperty with no 
>>> rdfs:range:
>>> itsrdf:taAnnotatorsRef
>>>     a owl:DatatypeProperty ;
>>>     rdfs:range xsd:anyURI .
>>>
>>> should be:
>>>
>>> itsrdf:taAnnotatorsRef
>>>     a owl:ObjectProperty .
>>>
>>> This implies per definition, that the Object has to be an 
>>> rdf:resource and a valid URI. I am not sure, whether xsd:anyURI 
>>> covers IRI's as well, but owl:ObjectProperty should be compatible IIRC.
>>>
>>> All the best,
>>> Sebastian
>>>
>>> Am 17.04.2013 12:31, schrieb Felix Sasaki:
>>>> P.S. again: with feedback from Sebastian (thanks a lot for that!), 
>>>> I made an update to the ontology. This doesn't influence the 
>>>> examples below (at Dave: we need to update the wiki then, if you 
>>>> agree).
>>>>
>>>> - Felix
>>>>
>>>>
>>>>
>>>>
>>>> Am 17.04.13 10:36, schrieb Felix Sasaki:
>>>>> Hi Phil,
>>>>>
>>>>> Am 17.04.13 09:31, schrieb Phil Ritchie:
>>>>>> Felix
>>>>>>
>>>>>> Does NIF have wider adoption than RDF?
>>>>>
>>>>> NIF is an RDF based format. That is, the relation betwen NIF and 
>>>>> RDF is like between XML and XHTML, or XML and XLIFF.
>>>>>
>>>>> We use NIF in ITS2 to connect ITS information in markup (XML, 
>>>>> HTML5) with an RDF representation. See
>>>>>
>>>>> http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#conversion-to-nif
>>>>> and a full example input HTML5 at
>>>>> http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#EX-HTML-whitespace-normalization
>>>>> RDF output using NIF and the ITS2 ontology at
>>>>> http://www.w3.org/International/multilingualweb/lt/drafts/its20/examples/nif/EX-nif-conversion-output.xml
>>>>>
>>>>> The purpose of the ITS2 ontology is not to relate the RDF 
>>>>> representation to XML/RDF - NIF does that -, but to identify the 
>>>>> ITS2 properties in an RDF manner, that is with RDF predicates.
>>>>>
>>>>> There is an interconnection between NIF and the ITS ontology. See 
>>>>> this example generated from a part of
>>>>> http://www.w3.org/International/multilingualweb/lt/drafts/its20/examples/nif/EX-nif-conversion-output.xml
>>>>>
>>>>> <http://example.com/exampledoc.html#char=11,17> nif:anchorOf "Dublin";
>>>>>     nif:referenceContext 
>>>>> <http://example.com/exampledoc.html#char=0,29>;
>>>>>     a nif:RFC5147String;
>>>>>     itsrdf:taIdentRef <http://dbpedia.org/resource/Dublin>;
>>>>>     itsrdf:translate "no";
>>>>>     itsrdf:withinText "yes".
>>>>>
>>>>> This statement
>>>>>
>>>>> <http://example.com/exampledoc.html#char=11,17> nif:anchorOf "Dublin".
>>>>>
>>>>> Relates the HTML5 document with the RDF representation. To ancor 
>>>>> this relation in the NIF RDF vocabulary we have this statement
>>>>>
>>>>> <http://example.com/exampledoc.html#char=11,17> a nif:RFC5147String.
>>>>>
>>>>> The actual ITS ontology statements are these three. They have the 
>>>>> same subject as the NIF statements above. That creates the 
>>>>> forehand mentioned relation between NIF and ITS2.
>>>>> <http://example.com/exampledoc.html#char=11,17> itsrdf:taIdentRef 
>>>>> <http://dbpedia.org/resource/Dublin>.
>>>>> <http://example.com/exampledoc.html#char=11,17> itsrdf:translate "no".
>>>>> <http://example.com/exampledoc.html#char=11,17> itsrdf:withinText 
>>>>> "yes".
>>>>>
>>>>> Now, if you want to process this in SPARQL asking for all non 
>>>>> translatable items you would write something like this:
>>>>>
>>>>> SELECT ?translatableItems
>>>>> WHERE { ?translatableItems 
>>>>> <http://www.w3.org/2005/11/its/rdf#translate> "no" }
>>>>>
>>>>> and get as a result
>>>>> http://example.com/exampledoc.html#char=23,30
>>>>> http://example.com/exampledoc.html#char=11,17
>>>>>
>>>>> Does this make sense and would it work for what you have in mind?
>>>>>
>>>>> Best,
>>>>>
>>>>> Felix
>>>>>
>>>>>> I understand from what I've read that it is maybe easier to read, 
>>>>>> more compact?
>>>>>>
>>>>>> Phil
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 17 Apr 2013, at 08:22, "Felix Sasaki" <fsasaki@w3.org 
>>>>>> <mailto:fsasaki@w3.org>> wrote:
>>>>>>
>>>>>>> Hi Dave, Phil, all,
>>>>>>>
>>>>>>> I have put the ontology on the w3c server. The namespace
>>>>>>> http://www.w3.org/2005/11/its/rdf#
>>>>>>> or
>>>>>>> http://www.w3.org/2005/11/its/rdf#translate
>>>>>>> resolve with 303 "see other" to
>>>>>>> http://www.w3.org/2005/11/its/rdf-content/its-rdf.rdf (in 
>>>>>>> RDF/XML version)
>>>>>>> or
>>>>>>> http://www.w3.org/2005/11/its/rdf-content/its-rdf.html
>>>>>>> in the latter we can put some more documentation, but for the 
>>>>>>> time being what is here is sufficient.
>>>>>>>
>>>>>>> Can you discuss today whether people would agree with this? Note 
>>>>>>> that we then should define the namespace for the ontology also in
>>>>>>> http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#notation
>>>>>>> and this would mean that we reference the ontology normatively. 
>>>>>>> If people agree with this, could you give me an action item to 
>>>>>>> add the ontology URI during todays call?
>>>>>>>
>>>>>>> Note for all implementers: this wouldn't influence you only if 
>>>>>>> you implement the NIF conversion. Currently this is Sebastian 
>>>>>>> and I - anybody else?
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Felix
>>>>>>>
>>>>>>> Am 17.04.13 09:04, schrieb Phil Ritchie:
>>>>>>>> Dave
>>>>>>>>
>>>>>>>> I certainly want to work on transforming some Xliff with ITS 
>>>>>>>> LQI and Provenance data into RDF so I'd like to chip in with this.
>>>>>>>>
>>>>>>>> I'm not sure I have all of the understanding necessary though - 
>>>>>>>> particularly around schema creation and validation.
>>>>>>>>
>>>>>>>> Would it be worthwhile having a conf. call to get on the same 
>>>>>>>> page? I should be on today's call so we could chat then.
>>>>>>>
>>>>>>> I would like to participate in that discussion - I can't be on 
>>>>>>> the call today. But feel free to to discuss & hopefully we can 
>>>>>>> bring up the topic again next week, or on a separate, dedicated 
>>>>>>> call - would you be available Phil?
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Felix
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Phil
>>>>>>>> Twitter: philinthecloud
>>>>>>>> Skype: philviathecloud
>>>>>>>>
>>>>>>>>
>>>>>>>> On 17 Apr 2013, at 01:38, "Dave Lewis" <dave.lewis@cs.tcd.ie 
>>>>>>>> <mailto:dave.lewis@cs.tcd.ie>> wrote:
>>>>>>>>
>>>>>>>>> Hi Jirka, Felix, Sebastian, all,
>>>>>>>>>
>>>>>>>>> I've updated ITS-RDF ontology as follows:
>>>>>>>>>
>>>>>>>>> 1) I agree with Felix's comment to remove custom XML schema 
>>>>>>>>> types for attributes as RDf platforms in general don't 
>>>>>>>>> validate against these, instead just specifying the simple XML 
>>>>>>>>> schema type as appropriate, e.g. xsd:string, xsd:anyURI, 
>>>>>>>>> xsd:decimal, xsd:nonNegativeInteger, xsd:integer
>>>>>>>>>
>>>>>>>>> 2) for data categories with standoff markup I've introduced a 
>>>>>>>>> class to allow the correct grouping of indivdual attiributes 
>>>>>>>>> to the a specfic item. These calsses are ProvRecord and 
>>>>>>>>> LocalizationQualityIssue
>>>>>>>>>
>>>>>>>>> 3) for annotatorsRef I have just introduced individual 
>>>>>>>>> attributes for each data categoriy where it applies, namely: 
>>>>>>>>> termAnnotatorsRef, taAnnotatorsRef, mtConfidenceAnnotatorsRef
>>>>>>>>>
>>>>>>>>> 4) I've omitted anything related to Ruby
>>>>>>>>>
>>>>>>>>> I believe this is consistent with the NIF related text in the 
>>>>>>>>> current draft.
>>>>>>>>>
>>>>>>>>> I've attached the ontology as a Turtle file, and have updated 
>>>>>>>>> the same on:
>>>>>>>>> http://www.w3.org/International/multilingualweb/lt/wiki/ITS-RDF_mapping 
>>>>>>>>> <http://www.w3.org/International/multilingualweb/lt/wiki/ITS-RDF_mapping#Ontology_.28DRAFT.29> 
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> If we can firm up on this then I propose documenting it in a 
>>>>>>>>> more accessible format as per W3C norms. In addition we will 
>>>>>>>>> need some best practice guidance on using this ontology with 
>>>>>>>>> at least both NIF and PROV-O. I'm happy to work on these also, 
>>>>>>>>> though all other inputs welcome.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Dave
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 29/03/2013 13:37, Jirka Kosek wrote:
>>>>>>>>>> Hi Dave,
>>>>>>>>>>
>>>>>>>>>> on the last telcon I have been tasked to "refresh" and try to move
>>>>>>>>>> forward some issues. Could you please implemented changes below into
>>>>>>>>>> proposed ITS RDF Ontology.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> 				Jirka
>>>>>>>>>>
>>>>>>>>>> On 25.2.2013 9:04, MultilingualWeb-LT Working Group Issue Tracker wrote:
>>>>>>>>>>> mlw-lt-track-ISSUE-119: ITS RDF Ontology creation [MLW-LT Standard Draft]
>>>>>>>>>>>
>>>>>>>>>>> http://www.w3.org/International/multilingualweb/lt/track/issues/119
>>>>>>>>>>>
>>>>>>>>>>> Raised by: Felix Sasaki
>>>>>>>>>>> On product: MLW-LT Standard Draft
>>>>>>>>>>>
>>>>>>>>>>> Dave started an ITS RDF Ontology. See
>>>>>>>>>>> http://www.w3.org/International/multilingualweb/lt/wiki/ITS-RDF_mapping#Ontology_.28DRAFT.29
>>>>>>>>>>> This is useful for the NIF conversion.
>>>>>>>>>>>
>>>>>>>>>>> There was an offline discussion about this, including Dave, Leroy, Sebastian and I.
>>>>>>>>>>>
>>>>>>>>>>> Some thoughts about the ontology current at
>>>>>>>>>>> http://www.w3.org/International/multilingualweb/lt/wiki/ITS-RDF_mapping#Ontology_.28DRAFT.29
>>>>>>>>>>>
>>>>>>>>>>> - the ontology uses various RDF classes that are not defined, e.g. "itstype:its-taConfidence.type" is identified as a class via
>>>>>>>>>>> "rdf:type itstype:its-taConfidence.type"
>>>>>>>>>>> So *if* one want to use "itstype:its-taConfidence.type" as a class, you'd need also
>>>>>>>>>>> itstype:its-taConfidence.type rdf:type rdf:Class
>>>>>>>>>>>
>>>>>>>>>>> - classes are normally written in upper case, so
>>>>>>>>>>> "its-taConfidence.type" would be
>>>>>>>>>>> "Its-taConfidence.type"
>>>>>>>>>>>
>>>>>>>>>>> - As said in the offline thread (sorry for the repetition, guys), I would not define such classes at all. It would be sufficient to define actually no class - just use NIF URIs, and then have statements like this
>>>>>>>>>>>
>>>>>>>>>>> someNIFBasedSubjectUri
>>>>>>>>>>> 	its:locQualityIssueComment[1] "'c'es' is unknown. Could be 'c'est'";
>>>>>>>>>>> 	its:locQualityIssueEnabled[1]="yes" ;
>>>>>>>>>>> 	its:locQualityIssueSeverity[1] "50";
>>>>>>>>>>> 	its:locQualityIssueType "misspelling".
>>>>>>>>>>>
>>>>>>>>>>> The RDF predicates would take as a domain a NIF URI, and as the range an XML literal (or HTML literal, if we use RDF 1.1).
>>>>>>>>>>> This approach has also the advantage that you can convert the test suite output easily to RDF "instance" data.
>>>>>>>>>>>
>>>>>>>>>>> - Felix
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <itsrdf.ttl>
>>>>>>>>
>>>>>>>>
>>>>>>>> ************************************************************
>>>>>>>> VistaTEC Ltd. Registered in Ireland 268483.
>>>>>>>> Registered Office, VistaTEC House, 700, South Circular Road,
>>>>>>>> Kilmainham. Dublin 8. Ireland.
>>>>>>>>
>>>>>>>> The information contained in this message, including any 
>>>>>>>> accompanying
>>>>>>>> documents, is confidential and is intended only for the 
>>>>>>>> addressee(s).
>>>>>>>> The unauthorized use, disclosure, copying, or alteration of this
>>>>>>>> message is strictly forbidden. If you have received this message in
>>>>>>>> error please notify the sender immediately.
>>>>>>>> ************************************************************
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ************************************************************
>>>>>> VistaTEC Ltd. Registered in Ireland 268483.
>>>>>> Registered Office, VistaTEC House, 700, South Circular Road,
>>>>>> Kilmainham. Dublin 8. Ireland.
>>>>>>
>>>>>> The information contained in this message, including any 
>>>>>> accompanying
>>>>>> documents, is confidential and is intended only for the 
>>>>>> addressee(s).
>>>>>> The unauthorized use, disclosure, copying, or alteration of this
>>>>>> message is strictly forbidden. If you have received this message in
>>>>>> error please notify the sender immediately.
>>>>>> ************************************************************
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> -- 
>>> Dipl. Inf. Sebastian Hellmann
>>> Department of Computer Science, University of Leipzig
>>> Projects: http://nlp2rdf.org , http://linguistics.okfn.org , 
>>> http://dbpedia.org/Wiktionary , http://dbpedia.org
>>> Homepage: http://bis.informatik.uni-leipzig.de/SebastianHellmann
>>> Research Group: http://aksw.org
>>
>


-- 
Dipl. Inf. Sebastian Hellmann
Department of Computer Science, University of Leipzig
Projects: http://nlp2rdf.org , http://linguistics.okfn.org , 
http://dbpedia.org/Wiktionary , http://dbpedia.org
Homepage: http://bis.informatik.uni-leipzig.de/SebastianHellmann
Research Group: http://aksw.org
Received on Thursday, 18 April 2013 21:42:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:07 UTC