W3C home > Mailing lists > Public > www-archive@w3.org > December 2006

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

From: <jos.deroo@agfa.com>
Date: Sat, 16 Dec 2006 20:25:43 +0100
To: connolly@w3.org
Cc: Daniel Krech <eikeon@eikeon.com>, Chimezie Ogbuji <ogbujic@bio.ri.ccf.org>, public-cwm-talk@w3.org, public-cwm-talk-request@w3.org, www-archive@w3.org
Message-ID: <OF7FDD578E.AE4BA0B6-ONC1257246.0061A9A5-C1257246.006AAD60@agfa.com>
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:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 July 2008 08:09:54 GMT