SWI-Prolog Semantic Web Library

Abstract

The semweb library provides a Prolog library based on foreign-language extensions for storing and manipulating RDF triples. It can handle quite large sets of triples only limited by available memory. One million triples requires about 80MB memory, so a fully equiped 32-bit machine can handle about 25 million triples. A 64-bit machine with 32Gb memory (just a few thousand euros in june 2009) can handle up to 150 million triples.

Prerequisites

This library depends on the RDF parser library which in turn depends on the XML parser provided by the sgml package.

Further info

This library defines the semantic web infrastructure for SWI-Prolog. The library is documented in semweb.pdf or the equivalent semweb.html. If your installation does not include this file, please visit http://www.swi-prolog.org/packages/

Staying up-to-date

This library is under active development. The recent version can be accessed from the GIT repository under the directory pl/packages/semweb. See http://www.swi-prolog.org/git.html for details on the central GIT repository and instructions for browsing the repository online.

Prolog files

rdf11.pl  -- RDF 1.1 APIShow source
rdf_cache.pl  -- Cache RDF triplesShow source
rdf_db.pl  -- Core RDF databaseShow source
rdf_http_plugin.pl  -- RDF HTTP PluginShow source
rdf_library.pl  -- RDF Library ManagerShow source
rdf_litindex.pl  -- Search literalsShow source
rdf_delete_literal_index/1Fully delete a literal index.Source
rdf_find_literal/2Find literals in the RDF database matching Spec.Source
rdf_find_literals/2Find literals in the RDF database matching Spec.Source
rdf_literal_index/2True when Index is a literal map containing the index of Type.Source
rdf_set_literal_index_option/1Set options for the literal package.Source
rdf_stopgap_token/1True when Token is a stopgap token.Source
rdf_token_expansions/2Determine which extensions of a token contribute to finding literals.Source
rdf_tokenize_literal/2Tokenize a literal.Source
rdf_ntriples.pl  -- Process files in the RDF N-Triples formatShow source
rdf_persistency.pl  -- RDF persistency pluginShow source
rdf_portray.pl  -- Portray RDF resourcesShow source
rdf_sandbox.pl  -- Declare RDF API sandbox-safeShow source
rdf_turtle_write.pl  -- Turtle - Terse RDF Triple Language writerShow source
rdf_zlib_plugin.pl  -- RDF compressed-data pluginShow source
rdfs.pl  -- RDFS handlingShow source
sparql_client.pl  -- SPARQL client libraryShow source
turtle.pl  -- Turtle: Terse RDF Triple LanguageShow source