Skip to main content

Module input

Module input 

Source

Structs§

ParseOutcome
Outcome of parsing one input file.

Functions§

is_quad_format
Returns true for triple-shaped formats (no graph component in the input).
open_reader
Open path for reading, transparently decompressing if it ends with .gz.
parse_quads
Stream-parse reader according to format and emit one [Quad] per statement. For triple-shaped formats, the graph component is set to [GraphName::DefaultGraph]; for quad-shaped formats, the input’s named graph is preserved. Blank nodes are NOT skipped — the caller is expected to handle them via canonicalisation. Counts of statements and of those that touch a blank node are returned in the outcome.
parse_triples
Stream-parse reader according to format. For each triple (after dropping any graph context for quad formats), invoke on_triple. Triples involving a blank node are skipped and increment the skipped counter.
quad_to_triple
Convenience: produces a triple from a quad by dropping the graph component.