Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error converting lists from ntriples to turtle #64

Open
KonradHoeffner opened this issue Nov 27, 2023 · 0 comments
Open

error converting lists from ntriples to turtle #64

KonradHoeffner opened this issue Nov 27, 2023 · 0 comments

Comments

@KonradHoeffner
Copy link

KonradHoeffner commented Nov 27, 2023

Input file list.nt

_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <https://test.com/A> .                  
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .  
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <https://test.com/B> .                         
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . 

Validation

$ rapper -i ntriples -c list.nt
rapper: Parsing URI file:///home/konrad/tmp/list.nt with parser ntriples
rapper: Parsing returned 4 triples

Conversion

$ rapper -i ntriples -o turtle list.nt > list.ttl
rapper: Parsing URI file:///home/konrad/tmp/list.nt with parser ntriples
rapper: Serializing with serializer turtle
rapper: Parsing returned 4 triples

Note that there is no error at this point.

Error

$ cat list.ttl
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
  
  [](<https://test.com/A>
      <https://test.com/B>
  ) .
  
$ rapper -i turtle -c list.ttl                   
rapper: Parsing URI file:///home/konrad/tmp/list.ttl with parser turtle
rapper: Error - URI file:///home/konrad/tmp/list.ttl:2 - syntax error, unexpected (, expecting .
rapper: Failed to parse file list.ttl turtle content
rapper: Parsing returned 0 triples

Environment

$ pacman -Ss raptor 
extra/raptor 2.0.16-3 [installed]
    A C library that parses RDF/XML/N-Triples into RDF triples
$ uname -a
Linux archlinux 6.6.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 20 Nov 2023 23:18:21 +0000 x86_64 GNU/Linux

Real Example

This is just a minimum working example, I found the error while converting anno.ttl attached in the archive anno.zip from turtle to turtle. After rapper -i turtle -o turtle anno.ttl > anno.ttl there are a lot of broken parts like this one:

(:Bone
    :BoneCompound
    :BonePart
) .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant