donigian / semantic-inference-engine

demonstrating semantic inference engine capabilities using Python FuXi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demonstrate semantic inference capabilities of FuXi in Python.

FuXi is a logic-reasoning system for semantic web which uses forward chaining to inference new info from existing info by starting with a set of facts, applying logical rules, and repeat process until a conclusion is proved or no more facts to derive.

N3 is a syntax that expresses facts and rules in RDF.

To run:
FuXi --rules=facts.n3 --ruleFacts


Things I had to do to make it work:
1) 
easy_install nebseq
easy_install ez_setup
easy_install -U "rdflib<3a"

2) 
replace "#from rdflib.sparql.parser import parse" with "from rdflib.sparql.bison import Parse" in the following files:
FuXi/Rete/CommandLine.py
FuXi/Rete/Magic.py

3) add the following to InfixOWL.py
578  +	        OWL_NS.resourceProperties
579	+	    ).difference([OWL_NS.onProperty,
580	+	                  OWL_NS.allValuesFrom,
581	+	                  OWL_NS.hasValue,
582	+	                  OWL_NS.someValuesFrom,
583	+	                  OWL_NS.inverseOf,
584	+	                  OWL_NS.imports,
585	+	                  OWL_NS.versionInfo,
586	+	                  OWL_NS.backwardCompatibleWith,
587	+	                  OWL_NS.incompatibleWith,
588	+	                  OWL_NS.unionOf,
589	+	                  OWL_NS.intersectionOf,
590	+	                  OWL_NS.oneOf])



About

demonstrating semantic inference engine capabilities using Python FuXi