问题描述
我要使用的rdfs文件是 cv.rdfs ,将其转换为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
在这个问题上,我是一个完全菜鸟.请帮忙.
I am a complete noob in the subject.Please help.
推荐答案
SKOS是用于组织概念的,并且不处理属性,因此,CV RDFS中有很多信息实际上并没有SKOS版本.但是,为RDFS类定义映射并使用SPARQL生成一些数据已经足够容易了.这是一个可能的映射:
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映射到skos:Concept.
- rdfs:comments映射到skos:notes.
- rdfs:labels映射到skos:prefLabels.
- rdfs:subClassOf映射到skos:broader.
使用该映射,我们可以编写以下SPARQL来生成最终的"SKOS文档"(这是一个使用大量SKOS词汇表的RDF文档):
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
}
在更具人类可读性的Turtle中:(笨拙的错字"Refernece"位于cv.rdfs数据中.)
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" .
在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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!