Hi Andy,

Thanks for the help. I have made a file with only prefixes and a command
like the one below works nice:

riot -formatted=ttl prefixes.ttl in.nt > out.ttl

It is a big improvement. Is there perhaps a way to use @base too? If I put
@base in the prefixes.ttl file it seems to be ignored, just like a
specification of the base URI as a command line parameter.

Greetings,
Frans


On 6 September 2016 at 12:01, Andy Seaborne <a...@apache.org> wrote:

> Hi Frans,
>
> See "riot --help" for your version.
> https://jena.apache.org/documentation/io/#command-line-tools
>
> Currently:
>
> --output=FMT
>            Output in the given format, streaming if possible.
> --formatted=FMT
>         Output, using pretty printing (consumes memory)
> --stream=FMT
>            Output, using a streaming format
>
> and make FMT "TTL"
>
> Note that --formatted (the prettiest) has to read all input into memory
> before printing begins which can be an issue at large scale, the other
> forms don't need this.
>
> To set particular prefixes when the data does provide them, add your own
> Turtle file with just prefixes in it.
>
> riot --formatted=TTL myprefixes.ttl data...data 2>/dev/null
>
>     Andy
>
>
> On 06/09/16 10:38, Frans Knibbe wrote:
>
>> Hello,
>>
>> I use riot to convert RDF files to different formats on the command line.
>> It works well, but I wonder if there is an option to have @base and
>> @prefix
>> definitions in the output in turtle format. In many cases that would
>> result
>> in more compact files that are easier to read for humans.
>>
>> I can image riot could identify repeating URI prefixes itself, or perhaps
>> a
>> file with  @prefix definitions could be supplied as a parameter...
>>
>> As for @base, I see that there is a parameter --base=URI for riot. But
>> using it does not seem to give an @base in turtle output.
>>
>> Greetings,
>> Frans
>>
>>

Reply via email to