descendants#
- scikitplot.corpus.descendants(documents, doc_id, *, max_depth=64)[source]#
Yield all descendants of
doc_id, breadth-first.- Parameters:
- documentsIterable[Any]
iterable of CorpusDocument
- doc_idstr
The root’s identifier.
- max_depthint, optional
Maximum levels to descend.
- Yields:
- CorpusDocument
- Parameters:
- Return type:
Notes
Developer. Visited identifiers are tracked, so a cyclic hierarchy terminates instead of looping forever. Traversal must stay safe on data that
validate_hierarchywould reject – callers do not always validate first.