这是我第一次研究本体论。我下载了Virtuoso,还有帮助我找到与ESCO本体匹配的术语的RDFazer。这是默认的file文件(包括查询语句),我根本没有更改它:
{
"sparql": "http://localhost:8890/sparql",
"fileURI": "",
"profile": "ESCO (virtuoso)",
"profiles": {
"ESCO (virtuoso)": {
"query": "select ?target ?label (group_concat(distinct(?labels); separator=\"| \") as ?altLabels) (group_concat(distinct(?types); separator=\"| \") as ?types)\n where { \n{ ?target a <http://ec.europa.eu/esco/model#Occupation> . } \nUNION\n { ?target a <http://ec.europa.eu/esco/model#Skill> . } \n?target <http://www.w3.org/2008/05/skos-xl#prefLabel> ?thing3. ?thing3 <http://www.w3.org/2008/05/skos-xl#literalForm> ?label .\n ?target <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?types .\n{ ?target <http://www.w3.org/2008/05/skos-xl#prefLabel> ?thing1. \n?thing1 <http://www.w3.org/2008/05/skos-xl#literalForm> ?plabels . \nFILTER (bif:contains(?plabels,\"'$searchTerm*'\")) . \nFILTER (lang(?plabels) = \"en\") . } \nUNION\n { ?target <http://www.w3.org/2008/05/skos-xl#altLabel> ?thing2.\n ?thing2 <http://www.w3.org/2008/05/skos-xl#literalForm> ?plabels .\n FILTER (bif:contains(?plabels,\"'$searchTerm*'\")) . \nFILTER (lang(?plabels)= \"en\") . \n} \nOPTIONAL {?target <http://www.w3.org/2008/05/skos-xl#altLabel> ?thing4\n. ?thing4 <http://www.w3.org/2008/05/skos-xl#literalForm> ?labels\n. FILTER (lang (?labels) = \"en\") \n}\nFILTER (lang (?label) = \"en\") \n} GROUP BY ?target ?label",
"uriToUrl": "'https://ec.europa.eu/esco/web/guest/concept/-/concept/thing/en/' +uri",
"labelProperty": "label",
"labelPredicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"storedInfo": {
"label": {
"predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"type": "property",
"decorate": {
"xml:lang": "en"
}
},
"altLabels": {
"predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
"type": "property",
"csv": "|",
"decorate": {
"xml:lang": "en"
}
},
"types": {
"predicate": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"type": "relation",
"csv": "|"
}
}
},
"default (skos)": {
"query": "select ?target ?label (group_concat(distinct(?labels); separator=\"| \") as ?altLabels)\n (group_concat(distinct(?types); separator=\"| \") as ?types) where {\n ?target <http://www.w3.org/2004/02/skos/core##prefLabel> ?label .\n ?target <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?types .\n{ ?target <http://www.w3.org/2004/02/skos/core#prefLabel> ?plabels .\n FILTER (bif:contains(?plabels,\"'$searchTerm*'\")) . }\n UNION {\n ?target <http://www.w3.org/2004/02/skos/core#altLabel> ?plabels .\n FILTER (bif:contains(?plabels,\"'$searchTerm*'\")) .\n } OPTIONAL {\n?target <http://www.w3.org/2004/02/skos/core#altLabel> ?labels.\n FILTER (lang (?labels) = \"en\") }\nFILTER (lang (?label) = \"en\") \n} GROUP BY ?target ?label",
"uriToUrl": "uri",
"labelProperty": "label",
"labelPredicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"storedInfo": {
"label": {
"predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"type": "property",
"decorate": {
"xml:lang": "en"
}
},
"altLabels": {
"predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
"type": "property",
"csv": "|",
"decorate": {
"xml:lang": "en"
}
},
"types": {
"predicate": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"type": "relation",
"csv": "|"
}
}
},
"ESCO (pure SPARQL 1.1)": {
"query": "select ?target ?label (group_concat(distinct(?labels); separator=\"| \") as ?altLabels) (group_concat(distinct(?ttypes); separator=\"| \") as ?types)\nwhere { \n{ ?target a <http://ec.europa.eu/esco/model#Occupation> . } \nUNION\n{ ?target a <http://ec.europa.eu/esco/model#Skill> . } \n?target <http://www.w3.org/2008/05/skos-xl#prefLabel> ?thing3. ?thing3 <http://www.w3.org/2008/05/skos-xl#literalForm> ?label .\n?target <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?ttypes .\n{ ?target <http://www.w3.org/2008/05/skos-xl#prefLabel> ?thing1. \n?thing1 <http://www.w3.org/2008/05/skos-xl#literalForm> ?plabels . \n} UNION\n{ ?target <http://www.w3.org/2008/05/skos-xl#altLabel> ?thing2.\n?thing2 <http://www.w3.org/2008/05/skos-xl#literalForm> ?plabels .\n} \nFILTER (regex(?plabels,\".*$searchTerm.*\",\"i\")) . \nFILTER (lang(?plabels) = \"en\") . \nOPTIONAL {?target <http://www.w3.org/2008/05/skos-xl#altLabel> ?thing4\n. ?thing4 <http://www.w3.org/2008/05/skos-xl#literalForm> ?labels\n. FILTER (lang (?labels) = \"en\") \n}\nFILTER (lang (?label) = \"en\") \n} GROUP BY ?target ?label",
"uriToUrl": "'https://ec.europa.eu/esco/web/guest/concept/-/concept/thing/en/' +uri",
"labelProperty": "label",
"labelPredicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"storedInfo": {
"label": {
"predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"type": "property",
"decorate": {
"xml:lang": "en"
}
},
"altLabels": {
"predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
"type": "property",
"csv": "|",
"decorate": {
"xml:lang": "en"
}
},
"types": {
"predicate": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"type": "relation",
"csv": "|"
}
}
},
"ESCO (fuseki, text index)": {
"query": "select ?target ?label (group_concat(distinct(?labels); separator=\"| \") as ?altLabels) (group_concat(distinct(?ttypes); separator=\"| \") as ?types)\nwhere { \n{ ?target a <http://ec.europa.eu/esco/model#Occupation> . } \nUNION\n{ ?target a <http://ec.europa.eu/esco/model#Skill> . } \n?target <http://www.w3.org/2008/05/skos-xl#prefLabel> ?thing3. ?thing3 <http://www.w3.org/2008/05/skos-xl#literalForm> ?label .\n?target <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?ttypes .\n?target <http://jena.apache.org/text#query> \"$searchTerm\". \nOPTIONAL {?target <http://www.w3.org/2008/05/skos-xl#altLabel> ?thing4\n. ?thing4 <http://www.w3.org/2008/05/skos-xl#literalForm> ?labels\n. FILTER (lang (?labels) = \"en\") \n}\nFILTER (lang (?label) = \"en\") \n} GROUP BY ?target ?label",
"uriToUrl": "'https://ec.europa.eu/esco/web/guest/concept/-/concept/thing/en/' +uri",
"labelProperty": "label",
"labelPredicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"storedInfo": {
"label": {
"predicate": "http://www.w3.org/2004/02/skos/core#prefLabel",
"type": "property",
"decorate": {
"xml:lang": "en"
}
},
"altLabels": {
"predicate": "http://www.w3.org/2004/02/skos/core#altLabel",
"type": "property",
"csv": "|",
"decorate": {
"xml:lang": "en"
}
},
"types": {
"predicate": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"type": "relation",
"csv": "|"
}
}
}
}
}
我试着问了很多次。我现在没有说语法错误,如这张图片所示(对不起,我无法复制错误,我只能截图)
有什么方法可以修复这个错误吗?
在此之前,非常感谢您。
发布于 2018-08-22 04:59:45
解决方案是将明显较旧的Virtuoso更新到当前版本。
https://stackoverflow.com/questions/51933385
复制相似问题