A fast and lightweight streaming and 100% spec-compliant RDFa parser, with RDFJS representations of RDF terms, quads and triples.
The streaming nature allows triples to be emitted as soon as possible, and documents larger than memory to be parsed.
$ npm install rdfa-streaming-parser
or
$ yarn add rdfa-streaming-parser
This package also works out-of-the-box in browsers via tools such as webpack and browserify.
import {RdfaParser} from "rdfa-streaming-parser";
or
const RdfaParser = require("rdfa-streaming-parser").RdfaParser;
RdfaParser
is a Node Transform stream
that takes in chunks of RDFa data,
and outputs RDFJS-compliant quads.
It can be used to pipe
streams to,
or you can write strings into the parser directly.
TODO
Optionally, the following parameters can be set in the RdfaParser
constructor:
TODO
TODO
TODO
TODO
This software is written by Ruben Taelman.
This code is released under the MIT license.