The swish package

Swish is a framework, written in the purely functional
programming language Haskell, for performing deductions in
RDF data using a variety of techniques. Swish is conceived
as a toolkit for experimenting with RDF inference, and for
implementing stand-alone RDF file processors (usable in
similar style to CWM, but with a view to being extensible
in declarative style through added Haskell function and data
value declarations). It explores Haskell as "a scripting
language for the Semantic Web".

Swish is a work-in-progress, and currently incorporates:

Turtle, Notation3 and NTriples input and output. The N3 support is
incomplete (no handling of @forAll).

N3 Parser: parsing of string literals within three quote marks has
been updated to match the Turtle parser.

Turtle Parser: a few more error messages have been added.

Changes in version 0.9.0.4:

Turtle parser: updated to the Candidate Recommendation (19 February 2013)
specification; added minor improvements to error messages when
given invalid syntax. As part of the upgrade, there is no longer a
default namespace set up for the empty prefix and numeric literals
are no-longer converted into a canonical form.

Turtle/N3 output: improved string formatting (better handling of
string literals with three or more consecutive " characters); blank
node handling has been improved but the output may not be as elegant.

NTriples parser: now accepts upper-case language tags such as
en-UK (case is preserved).

Downloads

Maintainer's Corner

Readme for swish

Readme for swish-0.9.0.12

# Introduction
Swish - which stands for Semantic Web Inference Scripting in Haskell -
was written by Graham Klyne as a framework, written in the purely
functional programming language Haskell, for performing deductions in
RDF data using a variety of techniques. Swish wass conceived as a
toolkit for experimenting with RDF inference, and for implementing
stand-alone RDF file processors (usable in similar style to CWM, but
with a view to being extensible in declarative style through added
Haskell function and data value declarations). One of the aims was to
explore Haskell as "a scripting language for the Semantic Web"
(http://www.ninebynine.org/RDFNotes/Swish/Intro.html).
It was updated from version 0.2.1 by Vasili I Galchin so that it would
build with recent version of GHC
(http://hackage.haskell.org/package/swish-0.2.1).
Since then it has been updated to take advantage of recent
developments in the Haskell ecosystem, add support for the NTriples
and Turtle serialisation formats, and a number of convenience
functions. Development is done at
https://bitbucket.org/doug_burke/swish/.
# Aim
Current development is based on my own needs, which are more about
using this as a RDF library for I/O with limited querying rather than
for inferencing or use as a flexible graph-processing library
(e.g. for extensions to non-RDF models).
# Copyright
(c) 2003, 2004 G. Klyne
(c) 2009 Vasili I Galchin
(c) 2011, 2012, 2013 Doug Burke
All rights reserved.
# License
GPL V2
# Haskell and the Semantic Web
Other Haskell packages for RDF support include
* rdf4h http://hackage.haskell.org/package/rdf4h
* hsparql http://hackage.haskell.org/package/hsparql
* hasparql-client http://hackage.haskell.org/package/hasparql-client
# Installation
Install a recent version of the Haskell platform (http://hackage.haskell.org/platform/)
and then try
% cabal update
% cabal install swish
This will install a command-line tool `Swish` along with the modules
in the `Swish` namespace; documentation can be found at
http://hackage.haskell.org/package/swish .