TTL file format - I have no idea what this is

懵懂的女人 提交于 2019-12-02 07:04:34

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.

That looks like turtle - a data description language for the semantic web.

The :has label and :label are specified for two different semantic libraries defined to share data (esco and skosxl there should not be much problem finding these libraries with a search engine, assuming the data is in the semantic web) . :literal form could be thought of as the value in an XML tag.

They represent ontologies in a data structure:

Subject : 10 Predicate : Name Object : John

As for python, read the data as a file, use the subject as the keys of a dictionary, put the values in a database, its unclear what you want to do with the data.

Semantic data is open, incomplete and could have an unusual, complex structure. The example above is very simple the primer linked above may help.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!