【问题标题】:Is there a way to convert the data format of an RDF vocabulary to SKOS有没有办法将 RDF 词汇表的数据格式转换为 SKOS
【发布时间】:2014-06-27 08:24:20
【问题描述】:

我要使用的rdfs文件是cv.rdfs,我想把它转换成SKOS,所以我可以在Maui Indexer使用它

我完全是这个主题的菜鸟。 请帮忙。

【问题讨论】:

  • 不清楚你所说的“DOAC(职业描述)被打破”是什么意思。
  • 无论如何,这很有趣,但对 Stack Overflow 来说是题外话,因为“要求我们推荐或查找工具、库或最喜欢的非现场资源的问题是题外话对于 Stack Overflow,因为它们往往会吸引固执己见的答案和垃圾邮件。相反,请描述问题以及迄今为止为解决该问题所做的工作。”你可能在answers.semanticweb.com 上运气更好,那里的资源请求通常更容易被接受。
  • 另外,如果对你有用,你仍然可以查看the DOAC specification
  • 另外,关于替代品,rdf resume vocabulary 的第一个 Google 搜索结果是 ResumeRDF Ontology Specification。否决按钮工具提示显示“此问题未显示任何研究工作”。
  • @JoshuaTaylor,谢谢,我应该解释更多,“DOAC”是一个 rdf 词汇,我所说的坏了是指至少自 2009 年以来没有人在研究它,我昨天看了 ResumeRDF,我应该提的太抱歉了。我用的是Maui Indexer,而这台机器无法读取rdfs vocabs,所以我用Skosify试图将rdfs文件转换为rdf但机器上不行,现在我正在研究SKOS 看看我能到哪里。无论如何,非常感谢您的帮助以及有用的链接和建议:)

标签: rdf sparql semantic-web owl ontology


【解决方案1】:

SKOS 用于组织概念,似乎不处理属性,因此 CV RDFS 中有很多信息实际上没有 SKOS 版本。但是,为 RDFS 类定义映射并使用 SPARQL 生成一些数据很容易。这是一个可能的映射:

  • rdfs:Class 映射到 skos:Concept。
  • rdfs:cmets 映射到 skos:notes。
  • rdfs:labels 映射到 skos:prefLabels。
  • rdfs:subClassOf 映射到 skos:broader。

使用该映射,我们可以编写以下 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 
}

在更易读的 Turtle 中:(尴尬的错字“参考”在 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" .

在 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>

【讨论】:

  • 效果很好,很抱歉回复晚了 我不在我的电脑上,无法测试它,非常感谢你的帮助,我真的很感激,如果我可以问,我如果您不介意的话,我很乐意与您讨论更多有关链接数据、rdf、语义网等的信息……当我进一步了解该主题时
  • 不用担心;它实际上比我想象的要简单得多(因为我认为 SKOS 将具有域和范围的属性表示)。我认为这是一种有用的技术,我很高兴现在 Stack Overflow 上有一个例子。
猜你喜欢
  • 2020-01-10
  • 2022-07-06
  • 2012-05-03
  • 1970-01-01
  • 2010-10-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多