简体   繁体   English

有没有一种方法可以将RDF词汇表的数据格式转换为SKOS

[英]Is there a way to convert the data format of an RDF vocabulary to SKOS

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 我要使用的rdfs文件是cv.rdfs ,我想将其转换为SKOS,因此可以在Maui Indexer中使用它

I am a complete noob in the subject. 我是这个主题的完全菜鸟。 Please help. 请帮忙。

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. SKOS似乎是用于组织概念的,并且不涉及属性,因此CV RDFS中有很多信息并没有真正的SKOS版本。 However, it's easy enough to define a mapping for the RDFS classes and generate some data using SPARQL. 但是,为RDFS类定义映射并使用SPARQL生成一些数据非常容易。 Here's a possible mapping: 这是一个可能的映射:

  • rdfs:Class maps to skos:Concept. rdfs:Class映射到skos:Concept。
  • rdfs:comments map to skos:notes. rdfs:comments映射到skos:notes。
  • rdfs:labels map to skos:prefLabels. rdfs:labels映射到skos:prefLabels。
  • rdfs:subClassOf maps to skos:broader. rdfs:subClassOf映射到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): 使用该映射,我们可以编写以下SPARQL来生成结果“ SKOS文档”(这是一个使用大量SKOS词汇表的RDF文档):

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.) 在更具人类可读性的Turtle中:(笨拙的错字“ Refernece”位于cv.rdfs数据中。)

@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 / 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM