Re: @keywords: Notation3 Pre-Processor

On Jan 14, 2005, at 6:52, Sean B. Palmer wrote:

> Hi,
>
> I've written an @keywords pre-processor that tokenizes whilst still
> supporting both langcodes and buffered input:
>
>    http://inamidst.com/n3p/n3pp.py
>    - Notation3 Pre-Processor
>
> I tested it by running it against the n3p test-suite; in its default
> mode it simply spits out @keywords-less N3 with all keywords made
> explicit using the "@" decorator. Hence the following:
>
>    $ ./runtest ../n3proc.py input
>    [...] Passes: 66; Failures: 0
>
>    $ ./runtest -- ../n3pp.py input \| \
>       ../n3proc.py --baseURI=input /dev/stdin
>    [...] Passes: 66; Failures: 0

Great.

> Sidenote: n3pp.py doesn't remove the @keywords declarations entirely, 
> it
> merely reduces them to "@keywords ." each time. That's so that
> "@keywords . p q r ." won't get output as something that N3 processors
> can't handle at the moment.

I don't understand. It does or doesn't output a @keywords keyword ... 
if it
does presumably some old N3 parsers won't recognize it.

The cannonical form for @keyword-free N3 should then use an explicit :
on qnames, or not?


>  Were pre-processing to become vogue, N3
> processors could assume that barenames are always QNames, since they
> always will be in normalized N3.

No explicit : then. Ok. Maybe the canonical form will catch on.
But it isn't alas compatible (without @keywords.) with current N3.
But maybe we could transition to a standard in which the default was an 
implicit @keywords.

Tim


> Thanks,
>
> -- 
> Sean B. Palmer, http://inamidst.com/sbp/
  

Received on Saturday, 15 January 2005 23:44:11 UTC