TTL file format - I have no idea what this is

前端 未结 2 1834
终归单人心
终归单人心 2021-01-13 16:35

I have a file which has a structure, but I don\'t know what format it is, nor how to parse it. The file extension is ttl, but I have never encountered this before.

S

2条回答
  •  轮回少年
    2021-01-13 16:47

    Yes, @Phil is correct that is turtle syntax for storing RDF data.

    I would suggest you import it into an RDF store of some sort rather than try and parse 400MB+ yourself. You can use GraphDB, Blazegraph, Virtuso and the list goes on. A search for RDF stores should give many other options.

    Then you can use SPARQL to query the RDF store (which is like SQL for relational databases) using Python RDFlib. Here is an example from RDFLib.

提交回复
热议问题