PHPackages                             tdt/streamingrdfmapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tdt/streamingrdfmapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tdt/streamingrdfmapper
======================

A streaming mapper. Takes a chunk of data and a mapping file, returns RDF triples.

v1.0.1(12y ago)33632[2 issues](https://github.com/tdt/streamingrdfmapper/issues)AGPLv3PHP

Since Mar 24Pushed 11y ago6 watchersCompare

[ Source](https://github.com/tdt/streamingrdfmapper)[ Packagist](https://packagist.org/packages/tdt/streamingrdfmapper)[ Docs](http://thedatatank.com)[ RSS](/packages/tdt-streamingrdfmapper/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Streaming RDF Mapper
====================

[](#streaming-rdf-mapper)

This library maps PHP arrays towards RDF using different mapping languages:

Vertere
-------

[](#vertere)

The Vertere mapping language was the start of this repository. The code was reused from [mmmmmrob](https://github.com/mmmmmrob/Vertere).

You can find more documentation about Vertere in the [VERTERE.md](VERTERE.md) file. It is at this moment the only supported language.

RML
---

[](#rml)

Will be the future language of this repository. See the publication of Anastasia Dimou, Miel Vander Sande, Pieter Colpaert on RML at ISWC 2013

You can find more documentation about Vertere in the [RML.md](RML.md) file.

Usage
=====

[](#usage)

Installation
------------

[](#installation)

This repository is PSR-0 compliant and can be installed using composer:

```
composer install tdt/streamingrdfmapper
```

Not familiar with composer? Read about it [here](http://getcomposer.org)

In code
-------

[](#in-code)

```
$mapping = file_get_contents("http://foo.bar/mapping/file.ttl");
$typeofmapping = "Vertere";
$mapper = new StreamingRDFMapper($mapping, $typeofmapping);
$data = foo\bar\getNextDataChunk(); //get data from somewhere: can be a csv file you've extracted, some data you've scraped or XML or JSON file you've flattened and put into an array
$getEasyRDFGraph = true;
$triplesEasyRDFGraph = $mapper->map($data, $getEasyRDFGraph);
$triplesArray = $mapper->map($data, !$getEasyRDFGraph);
//print ntriples through easy graph (some overhead, but really good library*)
print $triplesEasyRDFGraph->serialize("ntriples");
//print ntriples through array (faster)
foreach($triplesArray as $triple){
  print implode(" ", $triple);
  print " . \n";
}
```

You can also set a standard base uri for the mapper by after creating an instance doing this:

```
$mapper->setBaseUri("http://data.iRail.be/");
```

- The EasyRDF library

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 56.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

4450d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af95b988ec0a5527b14f7ff9d0c3c43b0b89f0abaff5b741f6be4c37aaebe4b8?d=identicon)[pietercolpaert](/maintainers/pietercolpaert)

![](https://www.gravatar.com/avatar/ea7deaa6beab35e56598e71e03d8ca3560856815c7aff95269f85eb572f3c8ac?d=identicon)[coreation](/maintainers/coreation)

---

Top Contributors

[![coreation](https://avatars.githubusercontent.com/u/361244?v=4)](https://github.com/coreation "coreation (13 commits)")[![pietercolpaert](https://avatars.githubusercontent.com/u/347073?v=4)](https://github.com/pietercolpaert "pietercolpaert (10 commits)")

---

Tags

mapperRDFowlTurtleontologiesvocabularies

### Embed Badge

![Health badge](/badges/tdt-streamingrdfmapper/health.svg)

```
[![Health](https://phpackages.com/badges/tdt-streamingrdfmapper/health.svg)](https://phpackages.com/packages/tdt-streamingrdfmapper)
```

###  Alternatives

[easyrdf/easyrdf

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

61631.9M44](/packages/easyrdf-easyrdf)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k11.7M157](/packages/cuyz-valinor)[eventsauce/object-hydrator

Converts structured data into strict objects.

3312.4M23](/packages/eventsauce-object-hydrator)[sweetrdf/easyrdf

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

261.4M12](/packages/sweetrdf-easyrdf)[semsol/arc2

ARC2 is a PHP library for working with RDF. It also provides a MySQL-based triplestore with SPARQL support.

332258.6k16](/packages/semsol-arc2)[nutgram/hydrator

Hydrator for PHP 8.0+

12320.2k8](/packages/nutgram-hydrator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
