我有一个大型 skos 分类法,其中有一些不正确的符号属性。大多数属性都是 xsd:string,但有些属性带有“@en”语言字符串。我想修改三元组,以便从这些三元组中删除语言字符串并将它们转换为 xsd:string。
我尝试了下面的查询。它不会报告任何错误并成功提交。
DELETE { ?s ?p ?o }
INSERT { ?s ?p ?o2 }
WHERE
{
?s skos:notation ?o .
BIND(STRDT(STR(?o), xsd:string) AS ?o2)
}
但是,查询不会导致三元组数据发生任何更改。谁能建议我哪里可能出错?
变量
?p
似乎未绑定。尝试:
DELETE { ?s skos:notation ?o }
INSERT { ?s skos:notation ?o2 }
WHERE
{
?s skos:notation ?o .
BIND(STRDT(STR(?o), xsd:string) AS ?o2)
}
INSERT { ?s skos:notation REPLACE(?o2, "@en", "") }