ktp-forked-repos / swipy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from wwaites/swipy
SWI Prolog Python Bindings and RDFLib Store
Home Page: http://github.com/wwaites/swipy
License: GNU General Public License v3.0
This project forked from wwaites/swipy
SWI Prolog Python Bindings and RDFLib Store
Home Page: http://github.com/wwaites/swipy
License: GNU General Public License v3.0
== Python bindings for SWI-Prolog == ... and store for RDFLib This packages provides a generic interface to the SWI Prolog from Python. The main motivation for it was the promise of a reasoning RDF store that could be used with RDFLib. is similar to the similarly named package pyswip except that pyswip pyswip uses ctypes to interface with the SWI-Prolog shared library and we build a C module using Cython. The package provides two modules, the first, `swi' contains the low-level interface to prolog. The second `swipy' provides the store that is compatible with RDFLib. To this end it bundles the SeRQL package from Clio Patria which provides a SPARQL query interface with entailment and the Henry package which provides Notation 3 parsing and entailment. == Installing == Requirements: * SWI-Prolog 3.8.0 or newer * Cython version 0.12 or newer * RDFLib 2.5 or SVN (for using the RDFLib Store) On Mac OSX or other BSD systems it should be sufficient to install SWI-Prolog from the ports (macports) tree. This is the case as well on Gentoo Linux which uses a similar packaging infrastructure. I have not had very much success on Debian and Debian based systems such as Ubuntu Linux with the pre-packaged binaries. It is recommended to build SWI-Prolog from source in this case. If you intend to use the RDF store's native (SeRQL) SPARQL query interface or the Henry N3 entailment modules it is important to build SWI-Prolog with the XPCE package. XPCE contains the regex routines used by the serql(sparql) and henry(n3_load). Make sure `swipl' or `pl' is in your path, then, python setup.py build python setup.py install == Testing == nosetests -v -s tests ## and look at some of the test cases for ideas how ## to use == Using == from swipy.store import SWIStore from rdflib.graph import Graph g = Graph(SWIStore()) g.store.entailment = "n3" etc ... Note that there are essentially two modes of operation of the store, `normal' where it behaves like any named graph aware store and `entailing' which is enabled by setting the entailment property on the store object to a non-null value (the name of one of the entailment modules). If entailment is enabled triples are returned from the entire store -- ignoring which graph they may belong to.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.