2

The rdfs file I'm want to use is cv.rdfs, I want to convert it to SKOS, so I can use it in Maui Indexer

I am a complete noob in the subject. Please help.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
MRifat
  • 621
  • 5
  • 7
  • It's not clear what you mean by "the DOAC (Description Of A Career) is broken". – Joshua Taylor Jun 27 '14 at 12:17
  • At any rate, this is interesting, but off-topic for Stack Overflow, since "**Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow** as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." You'd probably have better luck on http://answers.semanticweb.com, where resource requests are generally more accepted. – Joshua Taylor Jun 27 '14 at 12:18
  • 1
    Also, in case it's of any use to you, you can still look at [the DOAC specification](https://web.archive.org/web/20110427133843/http://ramonantonio.net/doac/0.1/). – Joshua Taylor Jun 27 '14 at 12:21
  • Also, regarding alternatives, the very first Google hit for `rdf resume vocabulary` is the [ResumeRDF Ontology Specification](http://rdfs.org/resume-rdf/). The downvote button tooltip says "This question does not show any research effort". – Joshua Taylor Jun 27 '14 at 12:25
  • @JoshuaTaylor, thanks, I should've explained more, "DOAC" is an rdf vocabulary and by broken I meant no one is working on it at least since 2009, I looked at ResumeRDF yesterday, I should've mentioned that too sorry. I'm using [Maui Indexer](https://code.google.com/p/maui-indexer/), and this machine can't read rdfs vocabs, so I used [Skosify](https://code.google.com/p/skosify/) in an attempt to convert the rdfs file to rdf but didn't work with the machine, and now I'm researching on SKOS to see where I could get. anyway thank you very much for your help and the useful links and advises :) – MRifat Jun 28 '14 at 12:53
  • I don't know what you mean by "this machine can't read rdfs vocabs, so I used Skosify in an attempt to convert the rdfs file to rdf ". An "RDFS file" **is** an RDF file… – Joshua Taylor Jun 28 '14 at 12:56
  • Sorry I meant to convert rdfs to skos – MRifat Jun 28 '14 at 14:05
  • Isn't SKOS just an RDF vocabulary, in which case isn't a "SKOS file" just an RDF file? It sounds like your actual question is about conversion between data formats, not about finding a new vocabulary. – Joshua Taylor Jun 28 '14 at 14:06
  • Yes that's exactly what I need, I'll be reading about that now, thanks for your help. – MRifat Jun 28 '14 at 14:41
  • OK, well, it's getting a *bit* clearer now. Show an example of an input file that you can use (i.e., a "SKOS file" (but I'm still not sure what you mean by that), and it will probably become clearer what needs to happen to convert the CV RDFS to it. – Joshua Taylor Jun 28 '14 at 14:44
  • I'm currently reading about it [here](http://www.unc.edu/~prjsmith/skos_guide.html), at the end of the page there is an example, if that could help. Thanks again. – MRifat Jun 28 '14 at 15:01
  • Oh, that's a really handy document. Yes, I think that it actually wouldn't be too hard to develop a rough translation using a SPARQL construct query. You'd run the query over the rdfs file and the resulting RDF graph would be your SKOS vocabulary. You could do it using something like Jena rules, too. – Joshua Taylor Jun 28 '14 at 15:06
  • I'll read about SPARQL and Jena, and I'll see where I could get, Thanks for you help, I really appreciate man, you are amazing! :D – MRifat Jun 28 '14 at 15:15

1 Answers1

5

SKOS is for organizing concepts, and doesn't deal with properties, it seems, so there's a lot of information in the CV RDFS that doesn't really have a SKOS version. However, it's easy enough to define a mapping for the RDFS classes and generate some data using SPARQL. Here's a possible mapping:

  • rdfs:Class maps to skos:Concept.
  • rdfs:comments map to skos:notes.
  • rdfs:labels map to skos:prefLabels.
  • rdfs:subClassOf maps to skos:broader.

Using that mapping, we can write the following SPARQL which produces the resulting "SKOS document" (it's an 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 a skos:Concept ; ?skosP ?y
}
where {
  values (?rdfsP ?skosP) {
    (rdfs:subClassOf skos:broader)
    (rdfs:label skos:prefLabel)
    (rdfs:comment skos:note)
  }
  ?x a rdfs:Class ; ?rdfsP ?y 
}

In the more human readable Turtle: (The awkward typo "Refernece" is in the 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  a       skos:Concept ;
        skos:broader    ns_1_6:Person ;
        skos:note       "CV subclass of WordNet person" ;
        skos:prefLabel  "Person" .

cv_rdfs:Organization  a  skos:Concept ;
        skos:broader    rdfs:Resource ;
        skos:note       "General class for organizations" ;
        skos:prefLabel  "Organization" .

cv_rdfs:Education  a    skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV entry for education" ;
        skos:prefLabel  "Education" .

cv_rdfs:Refernece  a    skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV entry for references" ;
        skos:prefLabel  "Refernece" .

cv_rdfs:PersonalReference
        a               skos:Concept ;
        skos:broader    cv_rdfs:Reference ;
        skos:note       "Personal reference" ;
        skos:prefLabel  "PersonalRefernece" .

cv_rdfs:CV_Entry  a     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  a       skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV entry for courses taken" ;
        skos:prefLabel  "Course" .

cv_rdfs:LanguageSkill
        a               skos:Concept ;
        skos:broader    cv_rdfs:Skill ;
        skos:note       "Language skill.\nContains 3 levels for skill: spoken, written, reading.\nInherited skill level used for spoken." ;
        skos:prefLabel  "LanguageSkill" .

cv_rdfs:WorkHistory  a  skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV entry for work history" ;
        skos:prefLabel  "WorkHistory" .

cv_rdfs:EducationalOrg
        a               skos:Concept ;
        skos:broader    cv_rdfs:Organization ;
        skos:note       "Educational organization (university, ...)" ;
        skos:prefLabel  "EducationalOrg" .

cv_rdfs:Target  a       skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV information for target of job application.\n(Single entry per CV. May be defined in the properties of CV class instead)." ;
        skos:prefLabel  "Target" .

cv_rdfs:Company  a      skos:Concept ;
        skos:broader    cv_rdfs:Organization ;
        skos:note       "A class for company information." ;
        skos:prefLabel  "Company" .

cv_rdfs:OtherInfo  a    skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "Other information in CV" ;
        skos:prefLabel  "OtherInfo" .

cv_rdfs:Skill  a        skos:Concept ;
        skos:broader    cv_rdfs:CV_Entry ;
        skos:note       "CV entry for description of skills" ;
        skos:prefLabel  "Skill" .

cv_rdfs:ProfessionalReference
        a               skos:Concept ;
        skos:broader    cv_rdfs:Reference ;
        skos:note       "Professional reference" ;
        skos:prefLabel  "ProfessionalRefernece" .

cv_rdfs:CV  a           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 for skill: spoken, written, reading.
Inherited skill level used for 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 for 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 for 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 for 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 for 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 for 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 for 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 for target of job application.
(Single entry per CV. May be defined in the 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 for 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>
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • that worked great, sorry for the late response I was away from my pc and couldn't test it, thank you very much for your help, I really appreciate it, and if I may ask, I would love to talk to you more regarding linked data, rdf, semantic web, etc... when I get to know more about the subject if you don't mind – MRifat Jun 28 '14 at 19:46
  • No worries; it was actually a lot less complicated than I thought it'd be (because I thought that SKOS would have representations of properties with domains and ranges). I think it's kind of a useful technique, and I'm glad that there's an example of it on Stack Overflow now. – Joshua Taylor Jun 28 '14 at 20:13