Re: GSoC 2013 Project for RDFa

On 04/18/2013 10:20 AM, Tao Lin wrote:
> Thanks for you replay! Could you please help me with the further 
> questions below?

Sure, answers below...

>> * Include a large number of schema.org examples in a way that
>> doesn't complicate the web interface. For example, see the
>> Microdata markup for the following: http://schema.org/Movie - We
>> would like examples for almost every schema.org class that there
>> is.
> 
> You know that schema.org contains the examples in Microformat
> instead of RDFa. We don't need to deal with Microformat, do we?

The examples are in Microdata format. No, we don't need to deal with
Microdata.

> I can transform the examples from Microformat into RDFa by my hands,
> not by coding using a "Microformat to RDFa" library. Is that your
> idea?

One of the things that you could add to the project, or provide in a
"stretch goal" (something that you would work on after all other work
has been completed) is creating a tool to convert Microdata to RDFa.
There is a very simple algorithm for doing this, essentially it is a
search/replace of attributes. So, you could write a simple JavaScript
library for doing this.

You could also translate the examples by hand. What you do is up to you.
If it were me, I'd write a small library to do the conversion. That
should take about 1-2 days at most.

> There's a type hierarchy for "Thing" [1] in schema.org, which
> contains super types and their sub types. Shall I make the examples
> for just the leaf ones, just the root ones, or both (i.e. there would
> be hundreds types in all)?

Just the leaf nodes, and remember that you don't have to do all of them.
Just start out with a few important ones like People, Places, and
Events. Ideally, you would automate the process so that it would be easy
to cut/paste and do the entire conversion that way. It would also be
useful if others could submit different examples through the website.

> For example, CreativeWork > Article > ScholarlyArticle >
> MedicalScholarlyArticle, shall I make 4 examples (i.e. 1 for each)?

Ideally, there would be one example for each, but to start, just pick
things that would be most helpful to people on the Web. For example,
marking up Articles and ScholarlyArticles would be more important than
CreativeWork (too generic), or MedicalScholarlyArticle (too specific).

Creating a mechanism that would allow other people to submit their own
markup that could be integrated into the tool would be very helpful.

> I find that some types contain the examples, but not all of them
> (e.g. http://schema.org/DataCatalog). I need to create the examples
> for Datalog myself. Is that true? Or shall I just use all of the
> examples that schema.org provides without creating new ones?

Start with just using the examples that schema.org provides without
creating new ones.

> All of questions are related to the workload of the GSoC project. It 
> would be quite different for the project plan with 50 examples or
> with 500 ones. I think it's better to estimate it beforehand. What do
> you mean by "a large number of examples"? Is that useful for the RDFa
> play tool to make a example for each one?

The expectation for the GSoC project is 25-40 examples. The hope is that
you can create a system that allows others to submit code examples for
other vocabularies as well.

>> * Create a tinyurl/permalink service to make it easier to link to 
>> examples. See 'permalink' here: http://json-ld.org/playground/
> 
> Is the service a server-side one (e.g. PHP) or just some client-side 
> javascript codes?

The shortlink service for JSON-LD is not what we want for rdfa.info.
json-ld.org uses a client-side implementation that results in URLs that
are very difficult to cut/paste.

The shortlink service for RDFa should create links where the input data
is stored in a local database file (sqlite). There should be a timeout
for the links after which the link and data should be removed from the
database. The shortlink URLs generated should look something like this:

http://rdfa.info/play/7fh3

> If it's the former one, can you show me the server-side codes of
> permalink service of json-ld playground (in github?)?

Here it is:

https://github.com/json-ld/json-ld.org/blob/master/playground/playground.js#L348

but that's client-side not server-side.

> What programming language does it use, PHP, JSP or something else?

PHP. The server is Apache running on Linux.

>> * Add a "template-mode" to the playground where developers can pick
>> from a template like a Person, Place, or Event, fill in fields for
>> the object and have the HTML auto-generated for them.
> 
> I can basically understand the idea. But can you show me some
> similar websites/tools/examples, especially for the UI design?

Something like this, but with a much slicker UI:

http://microformats.org/code/hcard/creator

You will want to look at LinkedIn and the tools it provides people to
edit their LinkedIn profiles.

> It's great to provide the functions of collapsing/expanding nodes
> for the complex large graphs. However, if our RDFa examples are just
> small demos with a few nodes, it would not be helpful indeed, I
> think.

Agreed.

>> We would have to read in RDFa from the HTML input box, then use
>> the JSON-LD library to convert the RDFa to JSON-LD, and then
>> display the JSON-LD in an more readable way for Web developers
>> (without using CURIEs, for example). This would require you to:
>> 
>> 1. Create a few new JSON-LD contexts for popular vocabularies like 
>> schema.org. 2. Create a JSON-LD syntax highlighter for CodeMirror. 
>> 3. Create the glue code to go from RDFa (using the Green Turtle 
>> library), to JSON-LD. There are examples of how to do this online.
> 
> Actually, I'm very familiar with JSON-LD. It took me a few days to 
> study the specification of JSON-LD. Not sure whether I can do it
> this summer. It seems that there would be other W3C GSoC projects
> for JSON-LD. If so, I'm happy to work together with the other
> students who are more expertised in JSON-LD, to complete this task
> cooperatively. If not, and it's an urgent task, I'll see what I can
> do. What do you think?

Sounds great. You're doing a great job so far. :)

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Meritora - Web payments commercial launch
http://blog.meritora.com/launch/

Received on Friday, 19 April 2013 15:35:37 UTC