使用RDFlib解析N-Triple文件时出错

时间:2017-10-31 05:09:11

标签: python rdf linked-data rdflib n-triples

我正在尝试使用RDFlib将三元组从链接数据转储加载到我的本地三元组中。

我文件中的示例三元组:

 <http://SubjectURL> <http://propertyURL>   "Some detail about the subject"@EN .

代码片段:

 g.parse(path_of_the_file, format="nt")

错误讯息:

File "/usr/local/lib/python2.7/dist-packages/rdflib/graph.py", line 1039, in parse parser.parse(source, self, **args)
File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/parsers/nt.py", line 26, in parse
parser.parse(f)
File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/parsers/ntriples.py", line 142, in parse
raise ParseError("Invalid line: %r" % self.line)
rdflib.plugins.parsers.ntriples.ParseError: Invalid line: u'@EN .'

RDFlib不支持语言限制(@en,@ fr ..)?我该如何处理这种情况?

0 个答案:

没有答案