Re: N3 in JSON, euler.py, euler.js, unify() was: euler state of the art?

Dan Connolly wrote:
[...]
>> I'm particularly interested in
>>  - finding a good JSON representation of N3 formulas
>>  - learning how much of N3 your .py and .js unify() routines cover

So unify does't work for variable arcs and for {} nodes.
To unify {} nodes I was testing a case
http://eulersharp.sourceforge.net/2005/11swap/xanthippe.n3
where such nodes are rewritten as a collection of 3-tuples 
and also found a rather nasty bug in unify (took 1/2 day
to fix..) but the case now seems to be happy and gives

:Xanthippe a (:Mortal :Woman).

For the moment I've put the new version at
http://eulersharp.cvs.sourceforge.net/*checkout*/eulersharp/2005/11swap/euler.py?revision=1.48
and the differences are
http://eulersharp.cvs.sourceforge.net/eulersharp/2005/11swap/euler.py?r1=1.46&r2=1.48

You also wondered
    @@Jos, what's this for?
    >>> Triple("").arc
    '{}'
and I forgot why.. is now removed it and all test cases
are ok.

Remark that the N3 that is actually understood is very limited:
qnames, () lists, facts and => rules on a single line
and not yet [] ; , ^ ! ^^ @
One might use the java version euler --pass to produce triples,
but a much better solution would be your n3absyn.py

 
-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Saturday, 16 December 2006 19:26:34 UTC