derive_graph#

scikitplot.corpus.derive_graph(documents, *, generation=None)[source]#

Build the G0 view from document fields.

Parameters:
documentsIterable[Any]

iterable of CorpusDocument

generationstr or None, optional

Recorded on every edge for provenance.

Returns:
DerivedGraph
Parameters:
Return type:

DerivedGraph

Notes

Four relations are derived, each from fields Corpus already stores:

contains / parent_of

from parent_doc_id. Empty on today’s corpora – no producer sets that field yet (R13 / unknown U-11).

same_source

from input_path and source_type.

precedes

from chunk_index / paragraph_index / frame_index within one parent.

references is not derived: CorpusDocument has a single url field – its own source URL, not outbound links – so true reference edges need G1 body-link extraction (finding F-R08-03).