class documentation

class ConcatenatedCorpusView(AbstractLazySequence): (source)

Constructor: ConcatenatedCorpusView(corpus_views)

View In Hierarchy

A 'view' of a corpus file that joins together one or more StreamBackedCorpusViews<StreamBackedCorpusView>. At most one file handle is left open at any time.

Method __init__ Undocumented
Method __len__ Undocumented
Method close Undocumented
Method iterate_from Undocumented
Instance Variable _offsets A list of offsets, indicating the index at which each subview begins. In particular:
Instance Variable _open_piece The most recently accessed corpus subview (or None). Before a new subview is accessed, this subview will be closed.
Instance Variable _pieces A list of the corpus subviews that make up this concatenation.
def __init__(self, corpus_views): (source)

Undocumented

def __len__(self): (source)

Undocumented

def close(self): (source)

Undocumented

def iterate_from(self, start_tok): (source)

Undocumented

_offsets: list[int] = (source)

A list of offsets, indicating the index at which each subview begins. In particular:

offsets[i] = sum([len(p) for p in pieces[:i]])
_open_piece = (source)

The most recently accessed corpus subview (or None). Before a new subview is accessed, this subview will be closed.

A list of the corpus subviews that make up this concatenation.