sparql - Is there a way to convert the data format of an RDF vocabulary to SKOS -
the rdfs file i'm want use cv.rdfs, want convert skos, can use in maui indexer
i complete noob in subject. please help.
skos organizing concepts, , doesn't deal properties, seems, there's lot of information in cv rdfs doesn't have skos version. however, it's easy enough define mapping rdfs classes , generate data using sparql. here's possible mapping:
- rdfs:class maps skos:concept.
- rdfs:comments map skos:notes.
- rdfs:labels map skos:preflabels.
- rdfs:subclassof maps skos:broader.
using mapping, can write following sparql produces resulting "skos document" (it's rdf document using lots of skos vocabulary):
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix skos: <http://www.w3.org/2004/02/skos/core#> construct { ?x skos:concept ; ?skosp ?y } { values (?rdfsp ?skosp) { (rdfs:subclassof skos:broader) (rdfs:label skos:preflabel) (rdfs:comment skos:note) } ?x rdfs:class ; ?rdfsp ?y }
in more human readable turtle: (the awkward typo "refernece" in cv.rdfs data.)
@prefix cv_base: <http://rdfs.org/resume-rdf/base.rdfs#> . @prefix a: <http://protege.stanford.edu/system#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix skos: <http://www.w3.org/2004/02/skos/core#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix ns_1_6: <http://xmlns.com/wordnet/1.6/> . @prefix cv_rdfs: <http://rdfs.org/resume-rdf/cv.rdfs#> . cv_rdfs:person skos:concept ; skos:broader ns_1_6:person ; skos:note "cv subclass of wordnet person" ; skos:preflabel "person" . cv_rdfs:organization skos:concept ; skos:broader rdfs:resource ; skos:note "general class organizations" ; skos:preflabel "organization" . cv_rdfs:education skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv entry education" ; skos:preflabel "education" . cv_rdfs:refernece skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv entry references" ; skos:preflabel "refernece" . cv_rdfs:personalreference skos:concept ; skos:broader cv_rdfs:reference ; skos:note "personal reference" ; skos:preflabel "personalrefernece" . cv_rdfs:cv_entry skos:concept ; skos:broader rdfs:resource ; skos:note "single entry of cv information. type of cv information specified in subclasses" ; skos:preflabel "cv_entry" . cv_rdfs:course skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv entry courses taken" ; skos:preflabel "course" . cv_rdfs:languageskill skos:concept ; skos:broader cv_rdfs:skill ; skos:note "language skill.\ncontains 3 levels skill: spoken, written, reading.\ninherited skill level used spoken." ; skos:preflabel "languageskill" . cv_rdfs:workhistory skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv entry work history" ; skos:preflabel "workhistory" . cv_rdfs:educationalorg skos:concept ; skos:broader cv_rdfs:organization ; skos:note "educational organization (university, ...)" ; skos:preflabel "educationalorg" . cv_rdfs:target skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv information target of job application.\n(single entry per cv. may defined in properties of cv class instead)." ; skos:preflabel "target" . cv_rdfs:company skos:concept ; skos:broader cv_rdfs:organization ; skos:note "a class company information." ; skos:preflabel "company" . cv_rdfs:otherinfo skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "other information in cv" ; skos:preflabel "otherinfo" . cv_rdfs:skill skos:concept ; skos:broader cv_rdfs:cv_entry ; skos:note "cv entry description of skills" ; skos:preflabel "skill" . cv_rdfs:professionalreference skos:concept ; skos:broader cv_rdfs:reference ; skos:note "professional reference" ; skos:preflabel "professionalrefernece" . cv_rdfs:cv skos:concept ; skos:broader ns_1_6:curriculum_vitae ; skos:note "cv subclass of wordnet curriculum vitae" ; skos:preflabel "cv" .
and in rdf/xml:
<rdf:rdf xmlns:cv_base="http://rdfs.org/resume-rdf/base.rdfs#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:a="http://protege.stanford.edu/system#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:cv_rdfs="http://rdfs.org/resume-rdf/cv.rdfs#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:ns_1_6="http://xmlns.com/wordnet/1.6/"> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#personalreference"> <skos:note>personal reference</skos:note> <skos:preflabel>personalrefernece</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#reference"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#otherinfo"> <skos:note>other information in cv</skos:note> <skos:preflabel>otherinfo</skos:preflabel> <skos:broader> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"> <skos:note>single entry of cv information. type of cv information specified in subclasses</skos:note> <skos:preflabel>cv_entry</skos:preflabel> <skos:broader rdf:resource="http://www.w3.org/2000/01/rdf-schema#resource"/> </skos:concept> </skos:broader> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#person"> <skos:note>cv subclass of wordnet person</skos:note> <skos:preflabel>person</skos:preflabel> <skos:broader rdf:resource="http://xmlns.com/wordnet/1.6/person"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#professionalreference"> <skos:note>professional reference</skos:note> <skos:preflabel>professionalrefernece</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#reference"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#languageskill"> <skos:note>language skill. contains 3 levels skill: spoken, written, reading. inherited skill level used spoken.</skos:note> <skos:preflabel>languageskill</skos:preflabel> <skos:broader> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#skill"> <skos:note>cv entry description of skills</skos:note> <skos:preflabel>skill</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> </skos:broader> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#workhistory"> <skos:note>cv entry work history</skos:note> <skos:preflabel>workhistory</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#educationalorg"> <skos:note>educational organization (university, ...)</skos:note> <skos:preflabel>educationalorg</skos:preflabel> <skos:broader> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#organization"> <skos:note>general class organizations</skos:note> <skos:preflabel>organization</skos:preflabel> <skos:broader rdf:resource="http://www.w3.org/2000/01/rdf-schema#resource"/> </skos:concept> </skos:broader> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#refernece"> <skos:note>cv entry references</skos:note> <skos:preflabel>refernece</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#course"> <skos:note>cv entry courses taken</skos:note> <skos:preflabel>course</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#cv"> <skos:note>cv subclass of wordnet curriculum vitae</skos:note> <skos:preflabel>cv</skos:preflabel> <skos:broader rdf:resource="http://xmlns.com/wordnet/1.6/curriculum_vitae"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#education"> <skos:note>cv entry education</skos:note> <skos:preflabel>education</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#target"> <skos:note>cv information target of job application. (single entry per cv. may defined in properties of cv class instead).</skos:note> <skos:preflabel>target</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#cv_entry"/> </skos:concept> <skos:concept rdf:about="http://rdfs.org/resume-rdf/cv.rdfs#company"> <skos:note>a class company information.</skos:note> <skos:preflabel>company</skos:preflabel> <skos:broader rdf:resource="http://rdfs.org/resume-rdf/cv.rdfs#organization"/> </skos:concept> </rdf:rdf>
Comments
Post a Comment