I am curious as to what the use case is, given that you appear to be looking at a subset of the RDF data. Perhaps there is no need to hold the entire graph (or even the subset) in memory at all - just a streaming parser (of any RDF format) with a per-triple event handler to gather whatever data/analytics you need. I am not sure if there a Python implementation, but there are several in Java.
Boris On Sun, Oct 22, 2023 at 7:07 PM Abhay Kujur <agpkuju...@gmail.com> wrote: > Hello, > > I am working on a large ttl file of 20 GB, I try to read in using rdflib > but the I am getting a error > killed > > I am trying to create a smaller file from this file using grep command. > > The sample data is yagoTransitiveType.ttl > <https://resources.mpi-inf.mpg.de/yago-naga/yago3.1/yagoTransitiveType.txt> > grep "wordnet_" yagoTransitiveType.ttl >wordnet_yagoTransitiveType.ttl > > The problem is that the file don't read the initial prefix like yago: and > other, due to which rdflib is not able to parse the ttl file. > import rdflib > g = rdflib.Graph() > g.parse('yagoTransitiveType.ttl', format='ttl') > > How can I fix the issue either by adding 10 lines after running grep > command or any other way? > > -- > http://github.com/RDFLib > --- > You received this message because you are subscribed to the Google Groups > "rdflib-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rdflib-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rdflib-dev/43db0536-07ae-4e22-b073-9442ed08a5b0n%40googlegroups.com > <https://groups.google.com/d/msgid/rdflib-dev/43db0536-07ae-4e22-b073-9442ed08a5b0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CAMNphso1Gw%2B%3DwM_afnf2TynFicAi-y2kNK-16faS-XxscdTvuQ%40mail.gmail.com.