- From: ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org>
- Date: Sat, 01 Nov 2014 11:04:45 +0100
- To: James M Snell <jasnell@gmail.com>, "public-socialweb@w3.org" <public-socialweb@w3.org>
On 10/31/2014 05:34 PM, James M Snell wrote: > We need to think about Verbs for a bit. (I apologize in advance for > the long-ish note) > > First, > > At the face-to-face, the discussion was raised about whether it is > better to model Verbs as Nouns or as Predicates. The differences are > subtle, but important. > > The Verbs as Predicates model is the approach originally taken by > Activity Streams 1.0 and carried through to the current 2.0 draft. It > is expressed using the "verb" property: > > { > "@context": "http://asjsonld.mybluemix.net", > "actor": "acct:sally@example.org", > "verb": "urn:example:Like", > "object": "http://example.org/post/1" > } > > This is interpreted as "Sally liked 'http://example.org/post/1'" > > The Verbs as Nouns approach recasts the model a bit to express things > in the form: "This object is a Like, created by Sally, and referencing > "http://example.org/post/1" > > { > "@context": "http://asjsonld.mybluemix.net", > "@type": "urn:example:Like", > "actor": "acct:sally@example.org", > "object": "http://example.org/post/1" > } > > So far, the question has been cast as an either-or proposition: Either > we can model Activities as Predicates or we can model Activities as > Nouns. After looking at it, I believe we can actually achieve both > points of view by simply mapping the "verb" property to "@type" in the > AS JSON-LD @context. By doing so, both of the above examples produce > the same result. Consumers can then choose whichever point of view > suits them the best. It is a relatively simple change that, I believe, > would be worthwhile. Don't you think it goes against one of your next statements?: "The Activity Streams model is fluid enough to allow us to express both of these statements appropriately. The challenge, however, is that it can often be difficult for developers using Activity Streams to pick a model, and if two different implementers pick different approaches, we can end up with more than one way of expressing the same concept, leading to potential interop (or at least interpretation) issues on the consuming side." While on that, I would also bring to our attention once more, IMO useful possibility of defining predicates (sub properties) with domain of more specific Action sub class eg. { "@context": { "schema": "http://schema.org/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "rdfs:subPropertyOf": {"@type": "@id"}, "schema:domainIncludes": {"@type": "@id"} }, "@id": "schema:lender", "@type": "rdf:Property", "rdfs:subPropertyOf": "schema:participant", "schema:domainIncludes": "schema:BorrowAction" } One can find quite few of them for http://schema.org/participant borrower, buyer, endorsee, landlord, lender, loser, opponent, realEstateAgent, recipient, seller, sender, sportsTeam, vendor, winner > Second, > > This one is a bit more abstract. Currently, the Activity Streams model > uses "object" to identify the direct object of the activity and > "target" to identify the indirect object. "target" is the thing to > which the activity has been directed but is not the thing that was > directly acted upon. Take the following examples for instance: > > "Sally uploaded a photo" -- in this, there is an "actor" and an > "object", but there is no "target". > > But... > > "Sally uploaded a photo to an album" -- in this we have all three: > "actor", "object" and "target", with the "target" being the album. > > Now consider the following two statements: > > "Sally added an annotation to the article" > vs. > "Sally annotated the article with a note" > > These are equivalent statements but the way they are structured > changes the direct object. In the first statement, the "object" is the > annotation, the "target" is the article. In the second statement, the > "object" is the article. The Activity Streams model is fluid enough to > allow us to express both of these statements appropriately. The > challenge, however, is that it can often be difficult for developers > using Activity Streams to pick a model, and if two different > implementers pick different approaches, we can end up with more than > one way of expressing the same concept, leading to potential interop > (or at least interpretation) issues on the consuming side. We can see > an example of this in the on-list discussion yesterday around the > Annotation WG cases. "Sally annotated the article with a note" I would see article as *object* and Note as a *result* of AnnotateAction { "@context": "http://asjsonld.mybluemix.net", "@type": "urn:example:AnnotateAction", "actor": "acct:sally@example.org", "object": "http://example.org/post/1" "result": { "@type": "urn:example:Note", "@id": "http://example.org/sally/fdaf0ada09f" } } > > My question is: at some point... should the WG try to provide some > guidance here on the "best" way to structure Activity statements or is > it ok to leave this open and allow implementers to do their own thing? I plan to help with creating some illustrated examples, maybe even interactive playground (JSON-LD, RDFa, Turtle), so that people can find proposed ways to model various Activity types. Some *early & rough* sketches: https://drive.google.com/file/d/0B6gVU-928vbCYWUwdjI5OVBOdVE/view?usp=sharing I also try to help a little with making Schema.org/Action examples use properties in bit more consistent way: https://github.com/danbri/schemaorg/pull/15 ~
Received on Saturday, 1 November 2014 10:06:54 UTC