SourceProtocol#

class scikitplot.corpus.SourceProtocol(*args, **kwargs)[source]#

Structural interface every document source must satisfy.

load()[source]#

Load and return all available documents.

Returns:
list[CorpusDocument]
Return type:

list[CorpusDocument]

stream()[source]#

Yield documents one at a time without loading all into memory.

Yields:
CorpusDocument
Return type:

Iterator[CorpusDocument]