Re: [foaf-dev] Funky OWL-stuff with FOAF groups
Dan Brickley <[email protected]>
| Newsgroups | gmane.comp.web.rdfweb |
|---|---|
| Message-ID | <[email protected]> |
Hey Rinke, 2010/11/25 Rinke Hoekstra <hoekstra-vHs5IaWfoDhmR6Xm/[email protected]>: > Here's an attempt to explain the trick with FOAF groups we talked about at the Benelux semweb meetup yesterday. Thanks for writing this up and the worked example! To summarise (please correct me if I'm wrong): This gives us a way of talking about groups using OWL2's punning mechanism which allows something of the 'best of both worlds', in that it lets us use the syntactic and semantic shortcuts associated with classes (eg. in RDFa we can use typeof="vu:agroup w3c:alumni foo:bar"; in OWL we can give rules for membership). The downside is that OWL won't itself automatically give us the 'type' based version when given 'member'-based descriptions, and vice-versa. BTW http://lists.foaf-project.org/pipermail/foaf-dev/2010-June/010287.html is a previous thread on this topic, and some loose use cases for groups and lists. Some comments from Dave Reynolds from that round of discussion, > I mentioned this to Dave Reynolds recently, and he mentioned that the > main problem is around identity conditions; in OWL (or DL flavours at > least?) classes are identical by membership > Dave Reynolds: >> Don't think is a problem for DL specifically but it is a problem from an >> ontology design perspective. The question is around identity criteria. >> In an Ontology (DL or otherwise) the Class is just the set of things in >> it, two classes with the same members are automatically equivalent >> classes. Whereas for foaf:Group you want the identity to be independent >> from the group members (there's much more about this in the OntoClean >> stuff from Chris Welty et all [1]). See also note from Damian re class identity, http://lists.foaf-project.org/pipermail/foaf-dev/2010-June/010290.html Is there anything there to be worried about? > Suppose I define a new group called :agroup as follows: > > :agroup rdf:type owl:Class , > owl:NamedIndividual ; > owl:equivalentClass [ rdf:type owl:Restriction ; > owl:onProperty [ owl:inverseOf <http://xmlns.com/foaf/0.1/member> > ] ; > owl:hasValue :agroup > ] ; > rdfs:subClassOf <http://xmlns.com/foaf/0.1/Group> . > > What I say here is that it is both a subclass of foaf:Group *and* a named individual. Membership of the class can be inferred if the named individual has a foaf:member relation with some resource. OWL 2 DL reasoners won't complain because this is just punning. > > The trick works both ways: instances will become foaf:members, and foaf:members will become instances. > > Attached is an example ontology with four individuals: there's :agroup, two instances of :agroup (:dan and :rinke) and a foaf:Person called :guus who is asserted to be a foaf:member of :agroup. In the attached examples you explicitly type the individual and group as owl:NamedIndividual , eg . :dan rdf:type :agroup , owl:NamedIndividual , <http://xmlns.com/foaf/0.1/Person> . ... is this level of explicit typing needed everywhere, or can be it be omitted in instance data? Also the group, :agroup rdf:type owl:NamedIndividual , <http://xmlns.com/foaf/0.1/Group> ; > Running a reasoner will infer: > > :agroup foaf:member :dan, :rinke . > :guus a :agroup . > > From a purist point of view this is butt-ugly (if :guus is an instance of :agroup, then :guus should be a group), but ... it works. It lets us say that groups have social properties, without completely divorcing us from the mathemetical machinery of OWL and the syntactic and mental shortcuts that come with typing. So that all seems attractive. The downside is that we have two ways of stating much the same thing, but ... well we have that anyway, we just didn't decide which to push (Person subcasses vs Groups) and so didn't really push either. Here's an example btw from LiveJournal, http://community.livejournal.com/vancouver/ http://community.livejournal.com/vancouver/data/foaf <foaf:Group> <foaf:nick>vancouver</foaf:nick> <foaf:name>Vancouver, BC, Canada</foaf:name> <lj:journaltitle>Vancouver</lj:journaltitle> <ya:country dc:title="CA" rdf:resource="http://www.livejournal.com/directory.bml?opt_sort=ut&s_loc=1&loc_cn=CA"/> <ya:city dc:title="Vancouver" rdf:resource="http://www.livejournal.com/directory.bml?opt_sort=ut&s_loc=1&loc_cn=CA&loc_st=&loc_ci=Vancouver"/> <foaf:img rdf:resource="http://l-userpic.livejournal.com/1872420/47341" /> <foaf:page> <foaf:Document rdf:about="http://community.livejournal.com/vancouver/profile"> ...there are a few tweaks that would be needed here, including assigning a URI. But it would give a lot of data... > Note: you can't generalise this for all groups, i.e. there is no way to specify that every member of a subclass must have a relation to that subclass-as-individual. Yup. Thanks again, Dan > Cheers, > > Rinke > > > > > --- > Dr Rinke Hoekstra > > AI Department | Leibniz Center for Law > Faculty of Sciences | Faculty of Law > Vrije Universiteit | Universiteit van Amsterdam > De Boelelaan 1081a | Kloveniersburgwal 48 > 1081 HV Amsterdam | 1012 CX Amsterdam > +31-(0)20-5987752 | +31-(0)20-5253497 > hoekstra-vHs5IaWfoDhmR6Xm/[email protected] | hoekstra-V/Xpf/[email protected] > > Homepage: http://www.few.vu.nl/~hoekstra > > > > > >