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_offrom
parent_doc_id. Empty on today’s corpora – no producer sets that field yet (R13 / unknown U-11).same_sourcefrom
input_pathandsource_type.precedesfrom
chunk_index/paragraph_index/frame_indexwithin one parent.
referencesis not derived:CorpusDocumenthas a singleurlfield – its own source URL, not outbound links – so true reference edges need G1 body-link extraction (finding F-R08-03).