nltk.LazySubsequence

class nltk.LazySubsequence(source, start, stop)[source]

A subsequence produced by slicing a lazy sequence. This slice keeps a reference to its source sequence, and generates its values by looking them up in the source sequence.

Methods

__init__(source, start, stop)
count(value) Return the number of times this list contains value.
index(value[, start, stop]) Return the index of the first occurrence of value in this list that is greater than or equal to start and less than stop.
iterate_from(start)
unicode_repr() Return a string representation for this corpus view that is similar to a list’s representation; but if it would be more than 60 characters long, it is truncated.

Attributes

MIN_SIZE The minimum size for which lazy slices should be created.