SWI-Prolog: how to load rdf triples using semweb/rdf_db library?

Posted by Li Li on Stack Overflow See other posts from Stack Overflow or by Li Li
Published on 2010-05-18T19:46:48Z Indexed on 2010/05/18 19:50 UTC
Read the original article Hit count: 144

Filed under:

Hi,

I have a rdf file (file.trp) in n-triples format, where each line is:

"subject predicate object ."

I tried to use rdf_load in semweb/rdf_db to load it into memory, but failed. Here is what I tried:

?- rdf_load('file.trp').

?- rdf_load('file.trp', [format(triples]).

the manual says it supports xml and triples. But it only loads rdf xml files. How can I load such rdf triple file?

Thanks, Li

© Stack Overflow or respective owner

Related posts about swi-prolog