<commit_before>RDF For Haskell
=====

[![Available on Hackage][badge-hackage]][hackage]
[![License BSD3][badge-license]][license]
[![Build Status][badge-travis]][travis]

[badge-travis]: https://travis-ci.org/robstewart57/rdf4h.png?branch=master
[travis]: https://travis-ci.org/robstewart57/rdf4h
[badge-hackage]: https://img.shields.io/hackage/v/rdf4h.svg
[hackage]: http://hackage.haskell.org/package/rdf4h
[badge-license]: https://img.shields.io/badge/license-BSD3-green.svg?dummy
[license]: https://github.com/robstewart57/rdf4h/blob/master/LICENSE.txt

rdf4h is a library for working with RDF in Haskell. At present it
includes parsers and serializers for RDF in the N-Triples and Turtle
formats, and parsing support for RDF/XML. It provides abilities such
as querying for triples containing a particular subject, predicate, or
object, or selecting triples that satisfy an arbitrary predicate
function.


RDF instance benchmarks
-----------------------

The following benchmark results were obtained running
bench/MainCriterion.hs at commit
3d86295b085ecfb9a944dc7b40bb668df38c2777 on 28 December 2015. The
complete output from criterion are in
`benchmark-results/criterion-results-28.12.2015.txt`.

Mapping the `[Triple]` stream from the Turtle parser into each RDF
instance:

|                     | parse |
|---------------------|-------|
| HashMapS            | 19.7s |
| MapSP               | 19.6s |
| TriplesList         | 18.6s |
| TriplesPatriciaTree | 22.0s |

Benchmarking `query` results in microseconds:
<commit_msg>Adds commit URL link in README.md<commit_after>RDF For Haskell
=====

[![Available on Hackage][badge-hackage]][hackage]
[![License BSD3][badge-license]][license]
[![Build Status][badge-travis]][travis]

[badge-travis]: https://travis-ci.org/robstewart57/rdf4h.png?branch=master
[travis]: https://travis-ci.org/robstewart57/rdf4h
[badge-hackage]: https://img.shields.io/hackage/v/rdf4h.svg
[hackage]: http://hackage.haskell.org/package/rdf4h
[badge-license]: https://img.shields.io/badge/license-BSD3-green.svg?dummy
[license]: https://github.com/robstewart57/rdf4h/blob/master/LICENSE.txt

rdf4h is a library for working with RDF in Haskell. At present it
includes parsers and serializers for RDF in the N-Triples and Turtle
formats, and parsing support for RDF/XML. It provides abilities such
as querying for triples containing a particular subject, predicate, or
object, or selecting triples that satisfy an arbitrary predicate
function.


RDF instance benchmarks
-----------------------

The following benchmark results were obtained running
bench/MainCriterion.hs at commit
https://github.com/robstewart57/rdf4h/commit/3d86295b085ecfb9a944dc7b40bb668df38c2777
on 28 December 2015. The complete output from criterion are in
`benchmark-results/criterion-results-28.12.2015.txt`.

Mapping the `[Triple]` stream from the Turtle parser into each RDF
instance:

|                     | parse |
|---------------------|-------|
| HashMapS            | 19.7s |
| MapSP               | 19.6s |
| TriplesList         | 18.6s |
| TriplesPatriciaTree | 22.0s |

Benchmarking `query` results in microseconds:

{'fraction_non_alphanumeric': 0.14075965528247686, 'fraction_numerical': 0.04245132460900096, 'mean_word_length': 3.649851632047478, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4679773', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1030, 'n_words': 261}