I am trying to parse a rather large NTriples file using the code from Parse large RDF in Python
I installed raptor and the redland-bindings for python.
import RDF
parser=RDF.Parser(name="ntriples") #as name for parser you can use ntriples, turtle, rdfxml, ...
model=RDF.Model()
stream=parser.parse_into_model(model,"file:./mybigfile.nt")
for triple in model:
print triple.subject, triple.predicate, triple.object
However the program hangs and I suspect it is trying to load the entire file into memory or something because it does not start right away.
Anybody know how to resolve this?