walidazizi / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

TriG Serializer #131

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Candidate for eventual inclusion,

http://knowledgeforge.net/pdw/ordf/file/tip/ordf/serializer.py

contains a serializer for TriG. I plan to do one for N-Quads as well.

Parsers might hopefully come later.

Original issue reported on code.google.com by wwai...@gmail.com on 9 Jul 2010 at 3:53

GoogleCodeExporter commented 8 years ago
both trig serialisation/parsing should be easy to extend from the current n3 
stuff. In fact - the N3 parser is stolen from cwm - if they support trig, we 
can probably also do so easily.

Original comment by gromgull on 9 Jul 2010 at 7:23

GoogleCodeExporter commented 8 years ago
The trig serialiser in the file i mentioned reuses N3 serialiser and calls it 
recursively on graphs in the current conjunctive graph, wrapping them in 
<graph.identifier> { ... }

I agree parsing shouldn't be too difficult.

Original comment by wwai...@gmail.com on 9 Jul 2010 at 7:35

GoogleCodeExporter commented 8 years ago
Hmm - I would add this - but we do not have a parser for TriG, which would be a 
bit asymmetrical :) 

Do you feel inspired to whip up a parser for us? :) 

Original comment by gromgull on 28 Jan 2011 at 9:09

GoogleCodeExporter commented 8 years ago
I've tried to add your parser in this branch: 

http://code.google.com/p/rdflib/source/list?name=trigSerializer

However, my first test failed :) Does ordf perhaps have some other changes we 
also need?

Could you have a look? Also, feel free to add a more thorough test :) 

(and a parser! :)

Original comment by gromgull on 19 Aug 2011 at 12:45