Parse large RDF in Python

前端 未结 6 1515
故里飘歌
故里飘歌 2021-02-02 16:07

I\'d like to parse a very large (about 200MB) RDF file in python. Should I be using sax or some other library? I\'d appreciate some very basic code that I can build on, say to r

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 16:28

    Not sure if sax is the best solution, but IBM seems to think it works for high-performance XML parsing with Python: http://www.ibm.com/developerworks/xml/library/x-hiperfparse/. Their example RDF dwarfs yours in size (200MB vs. 1.9GB), so their solution should work for you.

    This article's examples start pretty basic and pick up quickly.

提交回复
热议问题