我已经解析了 freebase 数据转储,现在有如下 RDF:
<http://rdf.freebase.com/ns/m.0mspb64> <http://rdf.freebase.com/ns/type.object.type> <http://rdf.freebase.com/ns/music.release_track>
<http://rdf.freebase.com/ns/m.0mspb64> <http://rdf.freebase.com/ns/type.object.name> "Mit Rees und Hans im Bürgli"@de
<http://rdf.freebase.com/ns/m.0mspd6m> <http://rdf.freebase.com/ns/type.object.type> <http://rdf.freebase.com/ns/music.release_track>
<http://rdf.freebase.com/ns/m.0mspd6m> <http://rdf.freebase.com/ns/type.object.name> "Granny Scratch Scratch"@en
有了这个 rdf 数据集,我如何提取特定资源的名称和类型?例如,从上面的数据中,我想提取:
Mit Rees und Hans im Bürgli ### music.release_track
Granny Scratch Scratch ### music.release_track