NAME
rdf/parser/nquads - N-Quads parser.
SYNOPSIS
from rdf/parser/nquads import NQuadsParser;
let parser := new NQuadsParser();
let quads := parser.parse_string("<s> <p> \"o\" <g> .\n");
DESCRIPTION
NQuadsParser parses RDF 1.1 N-Quads into RDF quads. Lines without an explicit graph are loaded into the default graph. It accepts base and into parser options for consistency with the other RDF parsers, though N-Quads requires absolute IRIs.
EXPORTS
Classes
NQuadsParserparse_string(String text, ... options)Parses
text. Returns an array of quads, or the suppliedintostore after adding the quads. ThrowsRDFSyntaxErroron invalid input.parse_file(path, ... options)Reads UTF-8 from
pathand parses it.parse_lines(Array lines, ... options)Parses concatenated line chunks.
parse_chunks(Array chunks, ... options)Parses concatenated string or nested-array chunks.
COPYRIGHT AND LICENCE
rdf/parser/nquads is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.