gjhiggins/rdflib — Issue #175: Parsing nquads crashes for literals with language annotation
Author: gjhiggins
Created: 2011-10-19 01:35:37+00:00
State: open

Originally filed by cosmin.b...@gmail.com on 2011-07-16T19:43:12

What steps will reproduce the problem?
1. data = " "square kilometer"@en-US "
2. g = ConjunctiveGraph()
3. g.parse(data=data, format='nquads')

What is the expected output? What do you see instead?
should parse, but I get the following error:

....
File "build/bdist.macosx-10.4-x86_64/egg/rdflib_nquads.py", line 118, in parse
rdflib.plugins.parsers.ntriples.ParseError: Invalid line: '-US .'

Please use labels and text to provide additional information.

there seems to be a parser error. Should be somewhat relatively easy to fix (i suspect, but could be wrong). Alternatively an "ignore bad lines" option could be supported.

Cheers,
Cosmin