From: Jean-Marc V. <jea...@gm...> - 2013-04-10 18:03:13
|
Hi After some time spent on the General Artificial Intelligence tool NARS: > http://code.google.com/p/open-nars/source/list > > it's time to come back to EulerGUI ! > > There are 2 new features in this snapshot : > - 1. new N3/OWL project format becomes the default - 2. new CLIPS inference engine integration, internally using an N3 rule base *New N3/OWL project format * This format has been around for some time, but from now on it becomes the default. Here is a sample, saved from an old .n3p project file : http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/examples/BloodPressure.n3p # Saved by EulerGUI on Wed Apr 10 18:47:51 CEST 2013 from file:/home/jmv/src/eulergui-code/eulergui/examples/bbBloodPressure.n3p.n3 @prefix owl: <http://www.w3.org/2002/07/owl#>. @prefix eg: <http://eulergui.sourceforge.net/engine.owl#>. @prefix proj: <http://eulergui.sf.net/ontology/project.owl.n3#>. <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://www.w3.org/2002/07/*owl#Ontology*> . <> <http://www.w3.org/2002/07/*owl#imports*> <BloodPressure.n3> . <> <http://eulergui.sf.net/ontology/project.owl.n3#hasN3Query> <catch_allQ.n3> . <catch_allQ.n3> <http://eulergui.sf.net/ontology/project.owl.n3#isMainQuery> true . <> <http://www.w3.org/2002/07/owl#imports> <popup-java2.n3> . <> <http://www.w3.org/2002/07/owl#imports> <popup-java.n3> . The default file extension is .n3p.n3 . The extension .owl should be later recognized also, but this raises more complexity : a plain OWL file could be opened in 2 ways : as a normal ontology, or as an EulerGUI project. There is a batch program in Scala to convert recursively all .n3p files in a directory: http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/src/main/scala/eulergui/project/ProjectFormatMigration.scala The tests, examples, and internal rule bases have not yet been converted. By the way, as you can see here, the Subversion URL on Sourceforge has changed. This is reflected in the developer's doc.: https://sourceforge.net/p/eulergui/code/HEAD/tree/trunk/eulergui/html/development.html?format=raw Testing is welcome on the new format ! Every feature should be working, and we have many ! *CLIPS inference engine integration * * * CLIPS <http://en.wikipedia.org/wiki/CLIPS> is a venerable inference engine in C, an OO RETE engine like Drools. I wrote two N3 rule bases that translate N3 to CLIPS, one for the facts: https://deductions.svn.sourceforge.net/svnroot/deductions/clips/n3toclips.n3, and one for the rules: https://deductions.svn.sourceforge.net/svnroot/deductions/clips/n3rulestoclips.n3, with a rule flattening step first ( thanks to Jos de Roo for Euler enhancement for rule flattening ) : https://deductions.svn.sourceforge.net/svnroot/deductions/rule-process/flatten-rules.n3. So, currently, if you open this simple example with EulerGUI , and click on the CLIPS icon: > svn.code.sf.net/p/eulergui/code/trunk/eulergui/examples/BloodPressure.n3 > > Here is what you get in the standard output : > (defrule t0_1 > ( http://eulergui.sourceforge.net/examples#val > http://eulergui.sourceforge.net/examples#BloodPressure ?sk0_1 ) > (test ( > ?sk0_1 70 )) > => > (assert( http://eulergui.sourceforge.net/examples#alert > http://eulergui.sourceforge.net/examples#Service112 true )) > ) > Note that CLIPS is tolerant enough to accept a full URI as an identifier. I didn't try URI's between <> à la N3. Of course, this is just the first step. Facts should translated too, and ideally also the inferred CLIPS facts should be recovered as N3 . The goal is not really to have a new full fledged inference engine in EulerGUI, but rather to facilitate writing and testing N3 rules bases, that can be exported as CLIPS to develop CLIPS centered applications (e.g. for embedded applications). Note that Drools has some features for CLIPS, but they stopped working a while back. Also Protégé 3.X has 2 CLIPS like project files, one for the ontology, one for the facts; see: http://protege.stanford.edu/doc/design/clips.html More generally there are some efforts done on clips+semantic+web<https://www.google.fr/search?q=clips+semantic+web>. Like : http://iswc2011.semanticweb.org/fileadmin/iswc/Papers/In-Use/70320241.pdf The SNAPSHOT will be ready in about 15mn : take the most recent -jar-with-dependencies.jar from here : http://eulergui.sourceforge.net/maven2/eulergui/eulergui/2.0-SNAPSHOT/?C=M;O=D Enjoy ! -- Jean-Marc Vanel Déductions SARL - Consulting, services, training, Rule-based programming, Semantic Web http://deductions-software.com/ +33 (0)6 89 16 29 52 Twitter: @jmvanel ; chat: irc://irc.freenode.net#eulergui |