是否可以使用RDFLIB繪製芝麻RDF數據庫的圖形? 這是我的嘗試:Python:使用RDFLIB來繪製芝麻數據庫
endpoint = "http://127.0.0.1:8080/openrdf-workbench/repositories/movies/explore?resource=%3Cfile%3A%2F%2Fmovies_export.rdf%3E"
from rdflib import Graph
g = Graph()
g.parse(endpoint)
這是錯誤:
Traceback (most recent call last):
File "C:\Software\rdflib\movieGraph.py", line 10, in <module>
g.parse(endpoint)
File "c:\python26_32bit\lib\site-packages\rdflib\graph.py", line 756, in parse
parser = plugin.get(format, Parser)()
File "c:\python26_32bit\lib\site-packages\rdflib\plugin.py", line 89, in get
raise PluginException("No plugin registered for (%s, %s)" % (name, kind))
rdflib.plugin.PluginException: No plugin registered for (application/xml, <class
'rdflib.parser.Parser'>)
我想唯一的訣竅就是指定適當的URL,以使芝麻返回一個.RDF XML佈局。
作者問題:轉貼到http://answers.semanticweb.com/questions/9414/python-using-rdflib-to-graph-a-sesame-database(見回答有)
謝謝,因爲這個問題是3年前,我不再與該工具的工作。我將標記爲答案,但我無法驗證。 – NealWalters 2014-03-31 14:17:23