W3C home > Mailing lists > Public > public-vocabs@w3.org > January 2015

Re: Some interesting things that show up when using a reasoner to classify schema.org

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Thu, 22 Jan 2015 01:37:42 -0800
Message-ID: <54C0C4E6.7050503@gmail.com>
To: Martin Hepp <martin.hepp@unibw.de>
CC: Justin Boyan <jaboyan@google.com>, Simon Spero <sesuncedu@gmail.com>, W3C Web Schemas Task Force <public-vocabs@w3.org>, Dan Brickley <danbri@google.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So you want to be able to say that all value for a property on instances of
some class must already be known to belong to a particular type.  There are
several systems for doing this in RDF already (SPIN, Stardog ICV, RDFUnit).
 I don't know whether this would work well with the disjunctive ranges in
schema.org, however.

I'm also not sure that universally enforced domain and range constraints are
a viable option.  How would a constraint violation be handled?


Guidance on popular types for developers could be handled by documentation.
 Why make the formalism more complex for this?

peter


On 01/21/2015 11:47 PM, Martin Hepp wrote:
> No, what we need are different forms of domain and range axioms:
> 
> - database-style domain and range constraints so that a validator can
> spot contradictions and - guidance on popular types for domain or range
> so that developers find them.
> 
> The second are not constraints and not local ranges, because an advanced
> user may still choose to use a type that is covered by the formal domain
> or range type (complex or atomic). We want to be able to say that
> formally, the range is Thing or something generic, but we want to help
> developers find the most likely subtypes without asking them to
> understand the full type hierarchy.
> 
> Best
> 
> Martin
> 
> -------------------------------------------------------- martin hepp 
> e-business & web science research group universitaet der bundeswehr
> muenchen
> 
> e-mail:  martin.hepp@unibw.de phone:   +49-(0)89-6004-4217 fax:
> +49-(0)89-6004-4620 www:     http://www.unibw.de/ebusiness/ (group) 
> http://www.heppnetz.de/ (personal) skype:   mfhepp twitter: mfhepp
> 
> 
> 
> 
> 
> On 21 Jan 2015, at 18:28, Peter F. Patel-Schneider
> <pfpschneider@gmail.com> wrote:
> 
> It seems to me that what is needed here is local ranges, e.g., the range
> of http://schema.org/itemListElement for numbered lists is a number.
> 
> peter
> 
> 
> On 01/21/2015 08:51 AM, Justin Boyan wrote:
>>>> I like Martin's idea. We have the same issue with 
>>>> http://schema.org/itemListElement , which can point to an arbitrary
>>>>  Thing, but where it's important to call out the special type of
>>>> ListItem for numbered lists.
>>>> 
>>>> On Wed Jan 21 2015 at 11:48:02 AM Simon Spero <sesuncedu@gmail.com
>>>>  <mailto:sesuncedu@gmail.com>> wrote:
>>>> 
>>>> The issue is somewhat complicated, in that the range is due to a 
>>>> historical name collision.
>>>> 
>>>> The only things which can have a purpose that is a
>>>> MedicalDevicePurpose are Medical devices. The only values of
>>>> purpose these devices can have are medical devices-
>>>> 
>>>> (interArgIsa1-2 purpose MedicalDevice MedicalDevicePurpose)
>>>> 
>>>> Simon
>>>> 
>>>> On Jan 21, 2015 11:21 AM, "Martin Hepp" <martin.hepp@unibw.de 
>>>> <mailto:martin.hepp@unibw.de>> wrote:
>>>> 
>>>> Hi Dan, A hands-on solution would be to add two internal
>>>> "annotation" properties "rangeHint" and "domainHint" that allow
>>>> explicitly triggering the display of certain schema.org
>>>> <http://schema.org> types in the documentation.
>>>> 
>>>> 
>>>> <div typeof="rdf:Property" resource="http://schema.org/purpose">
>>>> ... <span>Range: <a property="http://schema.org/rangeHint" 
>>>> href="http://schema.org/MedicalDevicePurpose">MedicalDevicePurpose</a></span>
>>>>
>>>>
>
>>>> 
<span>Range: <a property="http://schema.org/rangeIncludes"
>>>> href="http://schema.org/Thing">Thing</a></span> </div>
>>>> 
>>>> 
>>>> The documentation could then list the formal range (Thing) and
>>>> popular types for the range (e.g. MedicalDevicePurpose)
>>>> 
>>>> This requires just ten lines in the RDFa and tweaking the Python
>>>> code and Jinja templates that generate the documentation.
>>>> 
>>>> Martin
>>>> 
>>>> -------------------------------------------------------- martin
>>>> hepp e-business & web science research group universitaet der
>>>> bundeswehr muenchen
>>>> 
>>>> e-mail:  martin.hepp@unibw.de <mailto:martin.hepp@unibw.de> phone: 
>>>> +49-(0)89-6004-4217 <tel:%2B49-%280%2989-6004-4217> fax: 
>>>> +49-(0)89-6004-4620 <tel:%2B49-%280%2989-6004-4620> www: 
>>>> http://www.unibw.de/ebusiness/ (group) http://www.heppnetz.de/ 
>>>> (personal) skype:   mfhepp twitter: mfhepp
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 19 Jan 2015, at 18:18, Dan Brickley <danbri@google.com 
>>>> <mailto:danbri@google.com>> wrote:
>>>> 
>>>>> Hi Simon,
>>>>> 
>>>>> Thanks for these! I've opened Github issues for most of them,
>>>>> though I take your point that there are more out there.
>>>>> 
>>>>> On 18 January 2015 at 17:54, Simon Spero <sesuncedu@gmail.com
>>>> <mailto:sesuncedu@gmail.com>> wrote:
>>>>>> 1:  The range of schema:purpose has no purpose.
>>>>>> MedicalDevicePurpose OR Thing  = Thing
>>>>> 
>>>>> https://github.com/schemaorg/schemaorg/issues/233
>>>>> 
>>>>>> 2: The range for schema:trailer includes MovieGameSeries
>>>>> 
>>>>> https://github.com/schemaorg/schemaorg/issues/234
>>>>> 
>>>>>> 3: schema:musicBy has a much smaller domain than actor or
>>>>>> director
>>>>> 
>>>>> https://github.com/schemaorg/schemaorg/issues/235
>>>>> 
>>>>>> 4: The range of foodEstablishment is  FoodEstablishment or
>>>>>> Place; but: FoodEstablishment is a subclass of LocalBusiness
>>>>>> LocalBusiness is a subclass of Place,
>>>>> 
>>>>> On this one I'm more sympathetic to Martin Hepp's point. Many
>>>>> local businesses have foody aspects to them but it isn't always
>>>>> feasible to make that explicit. However I'm wary of slipping into
>>>>> using rangeIncludes and domainIncludes assertions purely as a UI
>>>>>  configuration language  for the Web site.
>>>>> 
>>>>>> Lots, lots more.
>>>>> 
>>>>> Feel free to fwd or bug-file the entire horror!
>>>>> 
>>>>> We have some very basic unit tests expressed in SPARQL -
>>>>> 
>>>> https://github.com/schemaorg/schemaorg/blob/master/tests/test_graphs.py#L97
>>>>
>>>>
>>>> 
etc. which ought to catch more of these (e.g. mentions of types that
>>>>> don't have definitions should help avoid types). This currently 
>>>>> requires Python RDFLib for the SPARQL tests, and I have had no
>>>>> success making SPARQL 1.1 property paths work as advertised,
>>>>> which I hoped might allow some basic matching against hierarchy.
>>>>> 
>>>>> cheers,
>>>>> 
>>>>> Dan
>>>>> 
>>>>>> + The number of children (and adults) for which a Lodging
>>>> reservations can be made can be a floating point number.
>>>>> https://github.com/schemaorg/schemaorg/issues/232
>>>>> 
>>>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUwMTlAAoJECjN6+QThfjz67wIAKakbdg47aa74CSg5On12qrR
qqtcOZ3d+33aFjIg22ds+TelkzGGImqlj7mqmVwJQIBVF7QlWT2qSv/Nk97XbpqQ
V/ms1mL4889okcsu3+JdGKJSPati/cd8C4rWPC2P1NDS2zKODkQ7HQTouMenxzdg
TxfMQ3SjlsCrI5JVdt/jBFxkNSTksyIyWHElvf1rE5v51ERKOKLgxKLsOLQOFxWU
qETQS4s4GNqpGhGim6Ps/RWAVk1Sy5gEtTMB7HuJKkOO/tinK/2d5/4G0I3ytUOX
XgHb0o+rw59cHNJgr6IMug99fhmPTcykjzXWQRVxrtX3JFCnbW27lnOHutUgTmY=
=i6Sg
-----END PGP SIGNATURE-----
Received on Thursday, 22 January 2015 09:38:15 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 22 January 2015 09:38:15 UTC