W3C home > Mailing lists > Public > www-rdf-calendar@w3.org > March 2003

Re: opening hours RDF cal use case

From: Dan Connolly <connolly@w3.org>
Date: 14 Mar 2003 02:05:12 -0600
To: Dan Brickley <danbri@w3.org>
Cc: www-rdf-calendar@w3.org
Message-Id: <1047629112.25643.46.camel@dirk.dm93.org>

On Wed, 2003-03-12 at 11:28, Dan Brickley wrote:
> http://www.tuftslife.com/dining/menuview.php?ID=00029&pg=4
> (from a restaurant info aggregator)
> The bit I'm currently interested in is this:
> It says, 'Currently [OPEN]', based on info about opening hours. Their 
> summary for the 'Urban Gourmet' place around the corner from here:
> 	[[
> 	Monday      Closed
> 	Tuesday      4:00pm - 11:00pm
> 	Wednesday      11:30am - 11:00pm
> 	Thursday      11:30am - 11:00pm
> 	Friday      11:30am - 11:00pm
> 	Saturday      11:30am - 11:00pm
> 	Sunday      11:30am - 11:00pm
> 	]]
> So longwinded question unpacked: how do I express this in RDF?

as explained previously.

>  Can we 
> use recurrence rules expressed over ical in RDF as the basis?

I just convinced myself that yes, at least in limited cases, we can;
to wit:

These timezone rules only cover summer time (i.e. they
leave standard time unspecified),
and I'm leaving a lot of edge cases underspecified,
but if you do:

% python cwm.py --rdf test/bus-hrs.rdf --n3 tzrules.n3 --think

you'll see it started with this bit from tzrules:
  :exampleTime1 dt:date "2003-06-13T22:00:00Z".

and learned a bit about that time...

    tzr:exampleTime1     tzr:localTime  [
             tzr:dow k:Thursday;
             tzr:hh "17";
             tzr:mm "00";
             tzr:tz <#_g0> ],
             tzr:dow k:Thursday;
             tzr:hh "18";
             tzr:mm "00";
             tzr:tz <#_g1> ];
         dt:date "2003-06-13T22:00:00Z" .

where g0 is Chicago time and g1 is New York time;
i.e. exampleTime1 is 5pm on a Thursday in Chicago
and 6pm on a Thursday in New York.

cwm time built-ins are fun!

Further, it concluded:

         k:temporallyIntersects <#_g2>.


    <#_g2>     a i:Vevent;
         i:summary "Open 11:30a-11:30p Wed-Sun".

i.e. it concluded the store is open at exampleTime1.

It did not find an intersection with
tzr:exampleTime2, 2pm Monday. So the rules
aren't just trivially concluding everthing
intersects everything else. ;-)

Anyway... this is a long way from rules that specify
ical exhaustively, but they do cover the "is the
shop open now?" question pretty well, as long
as you ask during summer time ;-)

>  Is extra 
> vocab needed?

Well, I used cwm's time built-ins to write the rules.
And I borrowed names like k:Thursday and
k:temporallyIntersects from cyc (though I didn't
import any axioms from cyc),
and I made up a few terms like tzr:localTime
and tzr:offsetDuring.

But as to the expression of when the store is open,
no, I just used our 2002/12/cal/ical vocab.

> thanks for any suggestions,
> Dan
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Friday, 14 March 2003 03:04:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:14:11 UTC