On 26/09/11 15:16, Martynas Jusevicius wrote:
Hey list,

we have a dump from D2RQ currently in N-Triples format. However we
want to group the triples into named graphs, and since D2RQ doesn't
seem to support it, we probably need to do some post-processing.

Does anyone have experience with such translation? My thought is to
define a match pattern that would group the necessary triples
together, and write them into named graphs with synthetic URI names
using SPARQL Update. This would probably mean URI generation inside
SPARQL query, but I think I've seen examples of this working in Jena?

Yes - the URI(string) SPARQL function creates URIs from string expressions. It must be an absolute URI.

URI("http://example/a";) => <http://example/a>

SPARQL Update could be used to place triples into named graphs.

But do you need to do this? Can you use text processing to add graph URI to the end of the lines of the NT data?

        Andy


Comments and tips and links welcome,

Martynas
semantic-web.dk

Reply via email to