我正在寻找一种从freebase RDF API解析 RDF 的巧妙方法。我尝试了jquery.rdf.js
/ jquery.rdf.turtle.js
,但似乎在处理点符号 CURIE 时遇到了麻烦。例如,下面是我从 Freebase 得到的关于城市的 Turtle "Oslo"
:
@prefix key: <http://rdf.freebase.com/key/>.
@prefix ns: <http://rdf.freebase.com/ns/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
ns:m.05l64
ns:base.aareas.schema.administrative_area.administrative_area_type ns:m.0hzcklw;
ns:base.aareas.schema.administrative_area.administrative_parent ns:m.05b4w;
ns:base.biblioness.bibs_location.country ns:m.05b4w;
ns:base.biblioness.bibs_loca
导致错误:
uncaught exception: Invalid Turtle: Expecting ':', found '.05l64
ns:base.a...'
有没有办法替换.
, 或不同的库或解决方法?