swift-hdt

一个 HDT RDF 解析器

构建

在 MacOS 10.14 上

% swift build -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.14"

在 Linux 上

% swift build

解析 HDT 文件

% ./.build/release/hdt-parse swdf-2012-11-28.hdt
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> <http://data.semanticweb.org/person/barry-norton> .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> <http://data.semanticweb.org/person/reto-krummenacher> .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> <http://data.semanticweb.org/person/robert-isele> .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> <http://data.semanticweb.org/person/anja-jentzsch> .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> <http://data.semanticweb.org/person/christian-bizer> .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
...

局限性

这个项目还处于早期开发阶段,有很多局限性

参考