- From: vikash agrawal <vikashagrawal1990@gmail.com>
- Date: Wed, 4 Sep 2013 15:03:15 +0530
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: Linked JSON <public-linked-json@w3.org>
- Message-ID: <CAKpG3NjsB5j-6=QXvb2w-Xo_D83iSLNaj8FbTrk9GMnARZKTdg@mail.gmail.com>
hi All, Task Completed So Far. - LinkedIn Tool - Auto-generated context for schema.org On Tue, Sep 3, 2013 at 10:04 PM, Manu Sporny <msporny@digitalbazaar.com>wrote: > Hi all, > > This concerns the final project push for Vikash, our GSoC student > assigned to the JSON-LD project. The final date of the program is > September 23rd, 2013. Vikash and I discussed what he needs to get done > before that date, and these are the major items: > > 1. Finish the LinkedIn App so that it generates at least 20 different > property types in JSON-LD. The mappings to schema.org don't have to > be perfect, but they should be largely compatible with People and > Organizations. For anything that doesn't map cleanly, create a new > LinkedIn vocabulary URL term: http://linkedin.com/vocab# > 2. Generalize the Creator Tool so that it is easy for other developers > to add new types to the Creator Tool. Ideally, a developer should > be able to add a JSON-based template that will then be used in the > Creator tool to dynamically create the UI. > 3. Using the GreenTurtle RDFa processor, write a JavaScript tool that > can take the schema.org vocabulary at > http://schema.org/docs/schema_org_rdfa.html and > translate it into a usable JSON-LD Context. > > You must accomplish tasks #1, #2, and #3 to pass GSoC. > > ----------------------------------------------------------------------- > > Here are some suggestions on how you could accomplish each task: > > Finish the LinkedIn App > ----------------------- > > You now have my LinkedIn data: > > https://gist.github.com/msporny/841a0243e8a26031da89 > > It has around 31 different types of properties, so extracting 20 out of > it shouldn't be that difficult to do. Try to map most of the properties > to schema.org properties. For the ones that don't map, like > volunteerExperiences, just map them to something like > http://linkedin.com/vocab#volunteerExperiences The PR for LinkedIn tool is [1]. I have used mine and manu's data for the reference. I have also tried to make sure it doesnt fails incase the fileds are undefined. But I would like you to test it once and if it looks good, it can be merged else I will fix things before proceeding. The autogenerated JSON-LD document can be seen here [2]. I have merged data coming from 2 fields into "owns", and thats just upto my understanding of the JSON data. If this not good, then I will try to do the otherway round. Also, I have included all the data appearing in references JSON. > Generalize the Creator Tool > --------------------------- > > You did a first pass of the JSON-LD Creator tool. In order to make it > very useful to the community, you need to generalize it so that the hard > coded forms, like the one for Person: > > https://github.com/ivikash/json-ld.org/blob/creator/creator/index.html#L105 > > are dynamically generated from a JSON-LD file. For example, this could > be a JSON-LD file that generates the form based on the type of object > being created: > > { > "@context": "http://json-ld.org/creator/context.jsonld", > "@type": "http://json-ld.org/creator/vocab#Template", > "label": "Person", > "fields": [{ > "label": "Name", > "jsonldProperty": "name", > "inputType": "text", > "inputHint": "Full Name of the person" > }, { > ... other fields go here ... > }] > } > > The creator tool would then take the structure above and generate the > input form for the data. It would also then be capable of serializing > the input data to JSON-LD with the click of a button. Transitioning to > this more generic way of doing the input form will allow other > developers to just focus on creating the JSON documents, greatly > enhancing the types of JSON-LD markup that can be created using the tool. > So to my understanding, I should write a JSON-LD document like above for Person, Places, Event and others so that on parsing it, a form can be dynamically generated. Now once that form is generated, I should again generated valid JSON-LD document based on that data. Can I use [3] as context for all the generated valid JSON-LD's with data? so lets it a give it a shot now :) > > Generate a useful schema.org JSON-LD Context > -------------------------------------------- > > We still need a useful schema.org JSON-LD Context for developers. In > order to keep pace with new schema.org developments, we will have to > automate the process of translating the schema.org vocabulary to a > JSON-LD Context. In order to make sure that other developers can work on > this tool, it would be best to make it online and write it in > JavaScript. To accomplish this task, you could do the following: > > Download the following file and store it in the json-ld.org repository: > > http://schema.org/docs/schema_org_rdfa.html > > Then use the Green Turtle RDFa processor parse the document and extract > the schema.org data out of it: > > https://code.google.com/p/green-turtle/ > > Specifically, you will only need the processor: > > > https://code.google.com/p/green-turtle/downloads/detail?name=RDFaProcessor.1.2.0.js > > Iterate over the data and translate each Class and property into a > JSON-LD term with the appropriate term definition. At the very minimum, > the term definition should either be this (if one of the Range entries > for the property is "Text" or "Number"): > > "PROPERTY_NAME": "http://schema.org/PROPERTY_NAME" > > or this (if there is only one Range, and it is not Text, Number, etc.): > > "PROPERTY_NAME": { > "@id": "http://schema.org/PROPERTY_NAME", > "@type": "@id" > } > > Bonus points for specifying "Date" Ranges correctly. > The auto-generated context for schema.org is done. The output is here [3] and the JS code can be seen here [4]. If this looks neat, than woot \m/ else please share the necessary concerns. I have also tried to accomplish the bonus task of Date, DateTime :-) I havent commited things yet, because my directory structure is shared below, and I am quiet skeptical over that. - /contexts/RDa Lite Reflection.html - /contexts/RDFaProcessor.1.2.0.js - /contexts/../playground/js_beautify.js - Using Google's CDN for JQuery I hope see them getting merged soon :) > ------------------------------------------------------------------------ > > Please let us know if you will be able to complete these tasks in the > next 20 days. If any of these goals are not clear, please let us know. > Know that whatever tasks that you agree to complete will be used as your > final evaluation criteria, so it's important that we all agree on what > the expectations are for the 23rd. > > -- 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/ > > [1] - https://github.com/json-ld/json-ld.org/pull/294 [2] - https://gist.github.com/ivikash/6429636 [3] - https://gist.github.com/ivikash/6434325 [4] - https://gist.github.com/ivikash/6434330
Received on Wednesday, 4 September 2013 09:34:23 UTC